gfranko / jquery.tocify.js

A jQuery Table of Contents plugin that can be themed with Twitter Bootstrap or jQueryUI.
http://gregfranko.com/jquery.tocify.js/
MIT License
927 stars 217 forks source link

Support for Twitter Bootstrap 3 #47

Open tmkinn opened 10 years ago

tmkinn commented 10 years ago

Bootstrap 3 has some marvelous features that makes it the Bootstrap version to use for our web projects. Your Tocify plugin is marvelous as well, but it is not working on Bootstrap 3.

It would be wonderful if your plugin could be updated to the new Bootstrap version.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

gfranko commented 10 years ago

I'll provide support for Bootstrap 3 in the next release. Thanks for the feature request!

tmkinn commented 10 years ago

I must consider optional solutions if your next release is far away. When do you think you´ll have it ready? With or without donations :)

gfranko commented 10 years ago

If I had a guess, I'd say it will be ready by Friday. Maybe earlier if I find some time tonight or tomorrow.

tmkinn commented 10 years ago

Great! I really appreciate it!!!

tmkinn commented 10 years ago

Not to push (yeah, right!)...any news yet?

gfranko commented 10 years ago

Sorry, had a busy week/weekend. I promise I will look at implementing this today =)

tmkinn commented 10 years ago

No need to apologize, I understand completely. And completely look forward to look at the issue list tomorrow morning. (I'm a few hours ahead of you...)

gfranko commented 10 years ago

You can use the new Bootstrap 3 theme support for Tocify (currently in the dev branch) by setting the theme option to bootstrap3, like this:

$("#toc").tocify({
  theme: "bootstrap3"
});

Let me know if you have any issues!

Note: I created a new bootstrap3.html page inside of the demos folder

tmkinn commented 10 years ago

Looks like it is working! Great job!

I will let you know if I discover any bugs later.

llaville commented 10 years ago

@gfranko Hello Greg,

Your plugin is really promising, but have still issues with Bootstrap 3 support.

I'm working on a project that allow to give a Bootstap 2 or 3 skin to any documentation written with AsciiDoc.

While I tried to implement the stable version 1.9.0, I saw that Bootstrap3 was not yet fully supported, but I discovered this issue report. So I have a look on this dev version and see issues about highlightOnScroll feature.

First, on your demos/bootstrap3.html, there is a mistake when you mixed cdn CSS bootstrap 3.0 resource and Bootstrap 2 JS script. Be carefull !

If you change both CSS and JS lines to latest versions 3.0.3 of Bootstrap you'll see quickly the issue with highlight on scroll

<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>

active css rule has a white background color and is applied on a href tag, not the li tag.

Hope this quick intro will help you. Tell me if you need more info Laurent

tmkinn commented 10 years ago

Thanks. I think I did fix that myself, actually. I had forgot, but nice to know!

Tor Michal Kinn

Den 9. des. 2013 kl. 12:16 skrev Laurent Laville notifications@github.com:

@gfranko Hello Greg,

Your plugin is really promising, but have still issues with Bootstrap 3 support.

I'm working on a project that allow to give a Bootstap 2 or 3 skin to any documentation written with AsciiDoc.

While I tried to implement the stable version 1.9.0, I saw that Bootstrap3 was not yet fully supported, but I discovered this issue report. So I have a look on this dev version and see issues about highlightOnScroll feature.

First, on your demos/bootstrap3.html, there is a mistake when you mixed cdn CSS bootstrap 3.0 resource and Bootstrap 2 JS script. Be carefull !

If you change both CSS and JS lines to latest versions 3.0.3 of Bootstrap you'll see quickly the issue with highlight on scroll

active css rule has a white background color and is applied on a href tag, not the li tag.

Hope this quick intro will help you. Tell me if you need more info Laurent

— Reply to this email directly or view it on GitHub.

kripper commented 10 years ago

There is an issue with the bootstrap3 demo page when resizing to 850px width.

ghost commented 10 years ago

@llaville I too have the problem you describe, did you ever find a solution for bootstrap3? My only problem is the highlight on scroll, otherwise the plugin works perfect.

ghost commented 10 years ago

Thx! That helped