Closed mulhoon closed 9 years ago
The skrollr.menu.click
method does much more, because the link might have a data-menu-top
attribute etc. The method you're suggesting would only be useful in limited use cases.
Maybe you should just use skrollr itself for it?
var position = $('#element-to-scroll-to').position().top;
skrollrInstance.animateTo(position);
Thanks, your answer makes a lot of sense.
Great scripts! Best I've come across.
A tiny thing... Sometimes an issue arises when you may need to scroll to a section, but there isn't a link for it. To solve it, I just did this... (in jquery)
but it might be nice to just give skrollr-menu a hash to scroll to. Something like this...