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

History not working with showAndHide to false #58

Open avandecreme opened 10 years ago

avandecreme commented 10 years ago

If showAndHide is set to false and one use a link with an anchor (for example http://gregfranko.com/jquery.tocify.js/#OptionsAPI ) the scrolling won't happen.

There is a specific test about it in the code: https://github.com/gfranko/jquery.tocify.js/blob/master/src/javascripts/jquery.tocify.js#L322-L327 However I can't think of any case where this test is necessary.

Removing the condition fixes the problem.

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

gfranko commented 10 years ago

I don't remember why I did that either. I think it would be safe to remove the condition. Would you mind sending a PR to the dev branch to fix this?

avandecreme commented 10 years ago

PR submitted :)

aufflick commented 10 years ago

Sorry for the "me too" but I must say this is exquisite timing - thanks for both tocify and for this PR!