I am using the ::-webkit-scrollbar selector which requires the following css on the body tag:
body { position:absolute; top:0; left:10px; bottom:0; right:10px; overflow-y:scroll; overflow-x:hidden; }
I need to have the page scroll down to reveal an element, which is near the bottom of the page, using the following jQuery:
$('.tester').click(function() { $('html, body').animate({ scrollTop: $(document).height() }, 'slow'); return false; });
This behaviour doesn't work due the position:absolute declaration on the body tag. If I remove this, the scrolling down behaviour works as expected, but it messes-up the webkit-scrollbar styling.
Can anyone think of a workaround?