【发布时间】:2015-05-16 22:35:46
【问题描述】:
我有一个空链接:
<a href="#" id="stop-point-btn">+ add stop-point</a>
绑定到一个 JS 函数:
$("#stop-point-btn").bind("click", addStopPoint);
它只是在 div 中添加一些内容:
function addStopPoint() {
$("#stop-point-content").append(stopPointHtml())
}
点击后,如果我向下滚动了一点,它会将我移回页面顶部(当然,因为提供了 # 空 id 值)。但是我怎样才能使我在页面上的位置不会改变(意味着滚动位置)。
【问题讨论】:
标签: javascript jquery html css