function tiao(i){
var cur = document.getElementById(i);
getPosition(cur);
}
function getPosition(e){
var t=e.offsetTop;
var l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;
}
$("html,body").animate({scrollTop:t},300);
}
<li class="hover" onclick="tiao('ct1')">
点击的元素,直接把要跳转到元素id传进去
<div class="list" id="ct1">
跳转到的元素