简体   繁体   中英

why bootboxjs scroll my page to top?

I use button as well as div but in all cases bootbox.js scroll my page to top.

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

我通过使用jquery-impromptu来解决这个问题

Try to use

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM