码迷,mamicode.com
首页 > 其他好文 > 详细

Prototype与Bootstrap冲突问题及解决

时间:2018-01-22 19:16:22      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:pac   code   class   window   nbsp   turn   添加   解决   lin   

修改 prototype.js 文件,Element.Methods:hide下面添加并修改代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

hide: function(element) {
  var isBootstrapEvent = false;
  if (window.jQuery) {
    jQuery(‘*‘).on(‘hide.bs.dropdown‘, function( event ) {
    isBootstrapEvent = true;
  });
    jQuery(‘*‘).on(‘hide.bs.collapse‘, function( event ) {
    isBootstrapEvent = true;
  });
    jQuery(‘*‘).on(‘hide.bs.modal‘, function( event ) {
    isBootstrapEvent = true;
  });
  }
  if(!isBootstrapEvent){
    $prototype(element).style.display != ‘none‘;
  }
  else{
    $prototype(element).style.display = ‘none‘;
  }
  return element;
},

 

 

Prototype与Bootstrap冲突问题及解决

标签:pac   code   class   window   nbsp   turn   添加   解决   lin   

原文地址:https://www.cnblogs.com/day2115/p/8330003.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!