logo-MindMajix
PostjQueryjQuery
S
Swetha Shetty

Posted on 21st July 2024|42 views

0
votes

Jquery Scroll To Element

How to smoothly scroll to an element using JQuery?

1 answers
Answers
P
sri kanth

Posted on 21st July 2024| views

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.

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number