Skip to content

Instantly share code, notes, and snippets.

@hugithordarson
Created February 10, 2022 06:27
Show Gist options
  • Save hugithordarson/a37748cbdf6225a09fb29fddc7457307 to your computer and use it in GitHub Desktop.
Save hugithordarson/a37748cbdf6225a09fb29fddc7457307 to your computer and use it in GitHub Desktop.
if (Prototype.BrowserFeatures.ElementExtensions) {
var disablePrototypeJS = function (method, pluginsToDisable) {
var handler = function (event) {
event.target[method] = undefined;
setTimeout(function () {
delete event.target[method];
}, 0);
};
pluginsToDisable.each(function (plugin) {
jQuery(window).on(method + '.bs.' + plugin, handler);
});
},
pluginsToDisable = ['collapse', 'dropdown', 'modal', 'tooltip', 'popover'];
disablePrototypeJS('show', pluginsToDisable);
disablePrototypeJS('hide', pluginsToDisable);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment