vendor/assets/javascripts/twitter/bootstrap/dropdown.js in less-rails-bootstrap-1.3.3 vs vendor/assets/javascripts/twitter/bootstrap/dropdown.js in less-rails-bootstrap-1.4

- old
+ new

@@ -1,7 +1,7 @@ /* ============================================================ - * bootstrap-dropdown.js v1.3.0 + * bootstrap-dropdown.js v1.4.0 * http://twitter.github.com/bootstrap/javascript.html#dropdown * ============================================================ * Copyright 2011 Twitter, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,21 +18,12 @@ * ============================================================ */ !function( $ ){ - var d = 'a.menu, .dropdown-toggle' + "use strict" - function clearMenus() { - $(d).parent('li').removeClass('open') - } - - $(function () { - $('html').bind("click", clearMenus) - $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' ) - }) - /* DROPDOWN PLUGIN DEFINITION * ========================== */ $.fn.dropdown = function ( selector ) { return this.each(function () { @@ -45,6 +36,20 @@ return false }) }) } -}( window.jQuery || window.ender ); \ No newline at end of file + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + var d = 'a.menu, .dropdown-toggle' + + function clearMenus() { + $(d).parent('li').removeClass('open') + } + + $(function () { + $('html').bind("click", clearMenus) + $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' ) + }) + +}( window.jQuery || window.ender );