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.
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);
$(body).scrollTop($(this)[0].scrollHeight);
you use this code ,i think it will work properly in IE and Firefox