我使用jquery跳转到我的网页的另一部分点击按钮。我已经使用以下到:Jquery回到顶部后行动
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#bike").click(function(){
location.href = "#scrolltohere";
});
});
</script>
//这是我点击
<a href="/Bike" id="bike">Bikes</a>
//这是我想跳到
<div class="eshop-section section" id="scrolltohere">
<h2 style="font-family: 'Lato'; font-size: 40px;" >        Bikes</h2>
部分但问题是它会滚动并返回页面顶部。
在这种情况下该怎么办?
1.充分利用HTML锚; 2.请使用更新版本的jQuery。 – Raptor
你有'URL/Bike'页面吗? –
是的,我确实 – Anon