• bootstrap中如何多次使用一个摸态框


    /**弹出框设置**/
       function showjcziimodal(url, width) {
           $("#jczii-modal").remove();//如果存在此Id的Modal先remove
           var modal = $('<div id="jczii-modal" class="modal fade .jczii-modal" tabindex="-1" role="dialog">
                                   <div class="modal-dialog" role="document" style="' + width + '">
                                       <div class="modal-content">
                                       </div>
                                   </div>
                           </div>').modal();
           $('body').append(modal);
           modal.find('.modal-content')
               .load(url, function (responseText, textStatus) {
                   if (textStatus === 'success' ||
                        textStatus === 'notmodified') {
                       modal.show();
                   }
               });
       }
        
        //页面所有Modal弹出
        $(function () {
            $('*[rel="jczii-modal"]').on('click', function (e) {
                var modal_width = !!$(this).attr('data-width') ? $(this).attr('data-width') : '';
                showjcziimodal($(this).attr('data-href'), modal_width);
                e.preventDefault();
            });
        })
    

      

  • 相关阅读:
    缺省源
    MySQL曹操外卖一
    MySQL曹操外卖二
    正确使用MySQL外键约束
    html大部分实用标签(结构型)
    html超级基础标签
    我的简单作业
    章节课程复习笔记
    FC超级玛丽研究(NES游戏)
    二维码生成
  • 原文地址:https://www.cnblogs.com/webSong/p/6346462.html
Copyright © 2020-2023  润新知