I have used a scrollTop
function in jQuery for navigating to top, but strangely 'the smooth animated scroll' stopped working in Safari and Chrome (scrolling without smooth animation) after I made some changes.
But it is still working smoothly in Firefox. What could be wrong?
Here is the jQuery function I used,
jQuery:
$('a#gotop').click(function() {
$("html").animate({ scrollTop: 0 }, "slow");
//alert('Animation complete.');
//return false;
});
HTML
<a id="gotop" href="#">Go Top </a>
CSS
#gotop {
cursor: pointer;
position: relative;
float: right;
right: 20px;
/*top:0px;*/
}
scrollTop
, which is not a valid css property, works on your demo?... can you share some info or link about it? – DiaphoresisscrollTop
inside animate css map properties... I'm still digging though.. – Diaphoresis