jQuery: the scrollTop() method
HTML
<p><button id="scroll">scrollTop()</button></p>
<div id="ahmet"></div>
CSS
#test {
width: 100px;
height: 100px;
position: relative;
top: 1000px;
background: green;
}
JavaScript
$('#scroll').click(function() {
$('html,body').animate({
scrollTop: $('#ahmet').css('top')
}, 800);
});