bootstrap modal操作简单易用,

 

//清除弹窗原数据
$("#create_modal").on("hidden.bs.modal", function() {
    $(this).removeData("bs.modal");
});

 

另附上modal一些触发函数

事件描述实例show.bs.modal在调用 show 方法后触发。

$('#identifier').on('show.bs.modal', function () {
  // 执行一些动作...
})

shown.bs.modal当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。

$('#identifier').on('shown.bs.modal', function () {
  // 执行一些动作...
})

hide.bs.modal当调用 hide 实例方法时触发。

$('#identifier').on('hide.bs.modal', function () {
  // 执行一些动作...
})

hidden.bs.modal当模态框完全对用户隐藏时触发。

$('#identifier').on('hidden.bs.modal', function () {
  // 执行一些动作...
})

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2021-06-09
猜你喜欢
  • 2022-03-07
  • 2022-12-23
  • 2022-01-13
  • 2021-06-03
  • 2022-01-17
  • 2022-12-23
相关资源
相似解决方案