Scripts for ‘scrolling to an id’ (such as jQuery.scrollTo) have unnecessary customization options and do not handle all page links, pointing to anchors, on their own. (or is it just me?)
Solution
jQuery('a[href*=\"#\"]').on('click', function(e) { e.preventDefault() jQuery('html, body').animate( { scrollTop: jQuery(jQuery(this).attr('href')).offset().top, } ,500 ,'linear' ) });
- Credits: https://www.taniarascia.com/smooth-scroll-to-id-with-jquery/
- Demo: https://codepen.io/taniarascia/pen/MJEXZj
Did this solve your issue?
THIS WORKED FOR ME. HELP OTHERS BY VOTING HOW IT WORKED FOR YOU.
RIGHT NOW THIS HAS 0% SUCCESS RATE.
TOTAL VOTES: 0
RIGHT NOW THIS HAS 0% SUCCESS RATE.
TOTAL VOTES: 0