cmpolis/scrollIt.js

scrollIt not activating until scroll (1px off or something)

Closed this issue · 7 comments

http://jeetframework.com/demo/scrollspy/

It might be a problem with my custom "fixed" nav plugin but it seems to work fine when I just scroll regularly, but when I click a link, it gets the .active class seemingly randomly. If I scroll a nudge down then it seems to activate properly.

Any idea?

I am experiencing the same issue.

As a work around I modified line 49 with the following code. var targetTop = $('[data-scroll-index=' + ndx + ']').offset().top + settings.topOffset + 1;

I will open a PR if this fixes the problem

Yeah I just tested this and it totally works. It lines up the pixels and everything. Kudos @fr4nktic

Gonna go ahead and fork, let me know if you end up pulling this and I'll delete fork.

You can gladly create the PR :)

Hell, it's + 1 added to one line. Too lazy to press the button. ;)

Merged, thanks!