simple-scrollspy
simple-scrollspy copied to clipboard
Refactor: Add throttle for the scroll event handler
When scrolling fast, the scroll event handler is called too many times. Therefore, the activeClass adds / removes to every the menu items.
Expect: Only add activeClass 1 time for the menu item when scrolling stopped.