Prinzhorn / skrollr-menu

skrollr plugin for hash navigation
MIT License
285 stars 143 forks source link

Scroll or Jump to the position #68

Closed LNAdmin closed 9 years ago

LNAdmin commented 9 years ago

Hello, thanks for such a great tool.

I have an issue that I am struggling with: I am using the menu to SCROLL to the particular positions/elements. I also have cases when I need to JUMP to the positions/elements. How I can selectively chose if the menu item should scroll or jump?

There is a menu setting "animate" that sets this functionality for the entire menu, but would it be possible to have an tag attribute such as data-menu-animate="true" to achieve that functionality:

[ul] [li][a href="#sa-scene-01" data-menu-top="0" data-menu-animate="true"]Scene 01[/a][/li] [li][a href="#sa-scene-02" data-menu-top="0" data-menu-animate="false"]Scene 02[/a][/li] [/ul]

Thank you

Prinzhorn commented 9 years ago

Duration of 0 should do what you want https://github.com/Prinzhorn/skrollr-menu#per-link-duration

data-menu-duration="0"