Technique: auto scroll follow window scroll top and set margin-top for scroll element.
And this is css codeScroller
#wrapper{
width:1000px;
height:1500px;
background:#f7f7f7;
margin:auto;
}
#scroll{
color:#fff;
height:40px;
width:80px;
background:#333;
position:absolute;
top:200px;
left:10px;
}
Finally javascript code $(document).ready(function(){
$(window).scroll(function(){
var k =$(this).scrollTop();
$('#scroll').stop(true).animate({
marginTop: k }, 500, function() {
// Animation complete.
});
})
});