Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
corysimmons opened this issue Oct 2, 2013 · 7 comments
Closed

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

corysimmons opened this issue Oct 2, 2013 · 7 comments

Comments

@corysimmons
Copy link

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?

@corysimmons
Copy link
Author

@frznk-tank
Copy link
Contributor

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

@corysimmons
Copy link
Author

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.

@corysimmons
Copy link
Author

@frznk-tank
Copy link
Contributor

You can gladly create the PR :)

@corysimmons
Copy link
Author

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

@cmpolis
Copy link
Owner

cmpolis commented Oct 5, 2013

Merged, thanks!

@cmpolis cmpolis closed this as completed Oct 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants