Popular Categories

ScrollTo Div using jQuery over a WordPress Theme

This is one of the very common requirements that you want your link to scroll at the bottom section using animation. Here is the code which can help you achieve this:

Assuming you have a button with the id button, try this example:

function scrollTo(divname) {
jQuery(‘html, body’).animate({
scrollTop: jQuery(“#”+divname).offset().top
}, 2000);

Note: You can adjust the speed changing 2000 to what ever number you like, the more the value the more slow it will scroll.