I'm using a function to detect scrollTop
and the do something. Its working on desktop browser but not on mobile devices:
$(window).scroll(function() {
if ($(this).scrollTop() >= 80) {
$('h2.main-info').addClass('scrolled');
} else {
$('h2.main-info').removeClass('scrolled');
}
});
What would be the equivalent of scrollTop
function for iPad?