zoukankan      html  css  js  c++  java
  • 为Bootstrap Modal(模态框)全局添加拖拽操作

     在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. });

  • 相关阅读:
    MYsql 之单标查询.
    MYSQL社区版安装手册
    爬虫框架学习
    celery_消息队列
    rabbitMQ消息队列
    Django分页设置
    Mysql-基础+安装指南
    super函数的用法
    hashlib 和loggin模块
    Python的魔法方法
  • 原文地址:https://www.cnblogs.com/angelasp/p/7278175.html
Copyright © 2011-2022 走看看