jQuery-One-Page-Nav icon indicating copy to clipboard operation
jQuery-One-Page-Nav copied to clipboard

Can't init current class when first enter a page

Open mytharcher opened this issue 11 years ago • 3 comments

If I didn't set the current class on a nav item, this plugin should add it to the current nav item.

I found in code that when init() function invoked, there is a property named didScroll was set to false. And the options did not include this property so that can't be configure by user.

mytharcher avatar Feb 17 '14 10:02 mytharcher

I have the same problem. When I load the page it does not start with the current element. How can I solve this?

juanpscotto avatar Mar 17 '14 02:03 juanpscotto

You can change the source code set didScroll to true.

mytharcher avatar Mar 22 '14 01:03 mytharcher

or you can trigger a fake scroll event to force the plugin to set the active section :

$(window).trigger('scroll.onePageNav');

Djules avatar Oct 17 '14 08:10 Djules