Dear support,
I have installed Smooth Scroll and read some information about it. It seems that I need to add this script in the custom JS section.
jQuery(function($){
$(’.smooth-scroll’).click(function(e){
e.preventDefault();
$('html,body').animate({
scrollTop: $('#' + $(this).attr('href').split("#").slice(-1)[0] ).offset().top - $('.x-navbar').height()
},700 ,'swing');
});
});
Then in the link i need to add class=“smooth-scroll” to the a tag to make it works, right?
However, in the menu item, when I add the class smooth-scroll to the menu item it goes to li tag rather than the tag. I think it is the default behaviour of Wordpress. How can I add class to the tag? Also, am I correct about the information to get the smooth scroll work?
Cheers,
Ken