ComputerWolf / SlickNav

Responsive Mobile Menu Plugin for jQuery
MIT License
939 stars 314 forks source link

Can we add smooth scrooling to slickNav? #166

Closed ValeedAnjum closed 4 years ago

ValeedAnjum commented 7 years ago

i am using following code but it is not working.when i click on a link it goes directly to the target $('a[href*="#"]:not([href="#"]),.slicknav_menu li a').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html, body').animate({ scrollTop: target.offset().top - 64 }, 800); return false; } } }); Here is the address https://failuer.000webhostapp.com/Project12/Demo8SmootEroor/index.html