I have below code which works fine in chrome.
However, it does not work on firefox and also IE. Nothing happens.
$("body").animate({scrollTop:$(this).offset().top},800);
So may i ask what i should write for firefox and IE??
Thanks.
try using
$('body,html').animate({scrollTop:$(this).offset().top},800);
instead of
$("body").animate({scrollTop:$(this).offset().top},800);
try this.
document.getElementsByTagName('body')[0].clientHeight
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With