Skip to content

Instantly share code, notes, and snippets.

@bordeo
Created March 31, 2016 09:25
Show Gist options
  • Save bordeo/f9bcb344510714c4c6e30fd140e4ae84 to your computer and use it in GitHub Desktop.
Save bordeo/f9bcb344510714c4c6e30fd140e4ae84 to your computer and use it in GitHub Desktop.
Bootstrap and Prototype Conflicts Workaround - http://www.softec.lu/site/DevelopersCorner/BootstrapPrototypeConflict
jQuery.noConflict()
if Prototype.BrowserFeatures.ElementExtensions
disablePrototypeJS = (method, pluginsToDisable) ->
handler = (event) ->
event.target[method] = undefined
setTimeout ->
delete event.target[method]
return
, 0
return
pluginsToDisable.each (plugin) ->
jQuery(window).on method + '.bs.' + plugin, handler
return
return
pluginsToDisable = [
'collapse'
'dropdown'
'modal'
'tooltip'
'popover'
'tab'
]
disablePrototypeJS 'show', pluginsToDisable
disablePrototypeJS 'hide', pluginsToDisable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment