I wrote this jquery code to scroll down to a particular section but is not working using anchor tag as the button to click | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

I wrote this jquery code to scroll down to a particular section but is not working using anchor tag as the button to click

$(document). ready(function(){ $('html, body,').animate({scrollTop: $('.classname'). offset().top}, 1000) });

27th Aug 2018, 1:32 PM
Alao Abiodun
Alao Abiodun - avatar
1 Resposta
+ 5
Why after "body" you added ","?
29th Aug 2018, 5:25 AM
Ayhas
Ayhas - avatar