malihu / page-scroll-to-id

Animated page scrolling to specific id within the document with jquery.
MIT License
224 stars 98 forks source link

smooth scroll and highlight not working #10

Open SaraTerry94 opened 7 years ago

SaraTerry94 commented 7 years ago

http://codepen.io/SaraTez/pen/ORwgJO The smooth scroll effect and highlight of menu items doesn't change on scroll/show up

I've tried lots of different combinations of the code but it doesn't seem to work, the codepen is what i'm trying at the moment.

The highlight worked when I used the JS below but the links wouldn't navigate to the sections/there was still no smooth scroll.

'$( document ).ready(function() { (function($){ $(window).on("load",function(){ $("a[href*='#']").mPageScroll2id(); }); })(jQuery);

$("#navigation a").mPageScroll2id({ scrollSpeed:900 }); });'

Thanks, Sara