Posted on 31st May 2023
If you want to smoothly scroll to an element in jQuery then you can do something like this
$(document).ready(function() {
$("#btn").click(function()
{
$("body,html").animate(
{ scrollTop: $("#menudiv").offset().top },
500 //speed );
});
});
If you are looking for the Jquery certification course, you can check out this Jquery course by Mindmajix.
STILL GOT QUERIES?
Copyright © 2013 - 2023 MindMajix Technologies