Answers for "jquery scrollto animate"

2

jquery scroll to id

$('html, body').animate(
    {
      scrollTop: $($(this).attr('href')).offset().top,
    },
    500,
    'linear'
  )
Posted by: Guest on January-29-2020
1

jquery scrolltop animate

var body = $("html, body");
body.stop().animate({scrollTop:0}, 500, 'swing', function() { 
   alert("Finished animating");
});
Posted by: Guest on March-18-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language