为什么bootbox js将我的页面滚动到顶部?

时间:2014-03-16 02:47:14

标签: jquery twitter-bootstrap bootbox

我使用按钮以及div,但在所有情况下,bootbox.js将我的页面滚动到顶部。

$("#sampleButton").click(function(){
    bootbox.alert("hey");
});

2 个答案:

答案 0 :(得分:3)

我使用jquery-impromptu

解决了这个问题

答案 1 :(得分:0)

尝试使用

$("#sampleButton").click(function(e){ 
  e.preventDefault();
  bootbox.alert("hey"); 
});
相关问题