【发布时间】:2014-03-16 02:47:13
【问题描述】:
我使用按钮和 div,但在所有情况下,bootbox.js 都会将我的页面滚动到顶部。
$("#sampleButton").click(function(){
bootbox.alert("hey");
});
【问题讨论】:
-
您在
#samplebutton上使用href="#"或类似的东西吗?如果是这样,请改用href="javascript:void(0)" -
@wwarren 不,我没有使用 href 我的 html 代码是Client
-
显示所有代码。 html + js。
-
html 代码:-客户端& java 脚本:- $("#sampleButton").click (function(){ bootbox.alert("嘿"); });
-
请创建 jsfiddle 来演示您的问题
标签: jquery twitter-bootstrap bootbox