angelasp

 在js中绑定方法

$(document).on("show.bs.modal", ".modal", function(){
    $(this).draggable({
//        handle: ".modal-header"   // 只能点击头部拖动
    });
    $(this).css("overflow", "hidden"); // 防止出现滚动条,出现的话,你会把滚动条一起拖着走的
});

  

事件 描述 示例
show.bs.modal 在调用 show 方法后触发。 $("#identifier").on(\'show.bs.modal\', function(){//do sth. });
show.bs.modal 当模态框对用户可见时触发(将等待 CSS 过渡效果完成)。 $("#identifier").on(\'shown.bs.modal\', function(){//do sth. });
hide.bs.modal 当调用 hide 方法时触发。 $("#identifier").on(\'hide.bs.modal\', function(){//do sth. });
hidden.bs.modal 当模态框完全对用户隐藏时触发。 $("#identifier").on(\'hidden.bs.modal\', function(){//do sth. });

分类:

技术点:

相关文章:

  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
猜你喜欢
  • 2022-02-09
  • 2021-08-31
  • 2021-09-17
  • 2022-02-09
  • 2022-02-10
相关资源
相似解决方案