mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 21:09:06 +02:00
move js plugins to root dir, begin writing tests, and change modal plugin to be more boss like
This commit is contained in:
26
docs/assets/js/bootstrap-dropdown.js
vendored
26
docs/assets/js/bootstrap-dropdown.js
vendored
@@ -1,26 +0,0 @@
|
||||
(function( $ ){
|
||||
|
||||
/* DROPDOWN PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
var selector = 'a.menu, .dropdown-toggle'
|
||||
|
||||
function clearMenus() {
|
||||
$(selector).parent('li').removeClass('open')
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('body').bind("click", clearMenus)
|
||||
})
|
||||
|
||||
$.fn.dropdown = function ( options ) {
|
||||
return this.each(function () {
|
||||
$(this).delegate(selector, 'click', function (e) {
|
||||
clearMenus()
|
||||
$(this).parent('li').toggleClass('open')
|
||||
return false
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
})( jQuery || ender )
|
Reference in New Issue
Block a user