Answer the question
In order to leave comments, you need to log in
Why doesn't this feature work on iPhones?
Why does this code work everywhere except for iOS devices? Doesn't work on iphone in safari or chrome. Help me please.
function scrollToElem(elem) {
var st = $('body').scrollTop() || $('html').scrollTop();
$('body, html').animate({
scrollTop: ($(elem).offset().top + st) + "px"
}, 2000);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question