i got a jquery code from this link (end of page): How to scroll to top of page with JavaScript/jQuery?

Why don't you just use some reference element at the very beginning of your html file, like

<div id="top"></div>

and then, when the page loads, simply do

$(document).ready(function(){

    top.location.href = '#top';

});

If the browser scrolls after this function fires, you simply do

$(window).load(function(){

    top.location.href = '#top';

});

now, everything is working but not in google chrome! how i can fix this code for google chrome? and how i can add a some animation to this code? like scroll speed or fast, slow etc...

Edit
Report