I want to disable the body from scrolling when a div is in the foreground. The div is scrollable and I don't want the body to scroll along with it. I accomplished this in a browser but it doesn't work in mobile. What do I need to change from when the div is open:
$('body').css('overflow', 'hidden');
to when the div is closed:
$('body').css('overflow', 'auto');
But as I said, it doesn't work in mobile (iOS or Android). I tried epreventdefault() also and that didn't help. The css gets changed with onclick events...