Created
May 20, 2014 09:15
-
-
Save andyhausmann/56ae58af55b14ecd56df to your computer and use it in GitHub Desktop.
Twitter Bootstrap and Prototype: How to fix Bootstraps problems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready( function() { | |
var isBootstrapEvent = false; | |
if (window.jQuery) { | |
var all = jQuery('*'); | |
jQuery.each(['hide.bs.dropdown', | |
'hide.bs.collapse', | |
'hide.bs.modal', | |
'hide.bs.tooltip', | |
'hide.bs.popover'], function(index, eventName) { | |
all.on(eventName, function( event ) { | |
isBootstrapEvent = true; | |
}); | |
}); | |
} | |
var originalHide = Element.hide; | |
Element.addMethods({ | |
hide: function(element) { | |
if(isBootstrapEvent) { | |
isBootstrapEvent = false; | |
return element; | |
} | |
return originalHide(element); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi thanks a lot for this.
I implemented this and it worked for me for some but not when it is with jquery ui. Kindly check this page
http://usefaith.voiedusucces.net/adminlte/
and click on the left menu and u will see that some of the Icon disappear. I will really appreciate if you can help me out with this. Thanks
