mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
clicking open dropdown shoud close it
This commit is contained in:
parent
7e5b304dbf
commit
709789d16d
1 changed files with 4 additions and 1 deletions
5
js/bootstrap-dropdown.js
vendored
5
js/bootstrap-dropdown.js
vendored
|
@ -36,8 +36,11 @@
|
|||
$.fn.dropdown = function ( options ) {
|
||||
return this.each(function () {
|
||||
$(this).delegate(selector, 'click', function (e) {
|
||||
var li = $(this).parent('li')
|
||||
, isActive = li.hasClass('open')
|
||||
|
||||
clearMenus()
|
||||
$(this).parent('li').toggleClass('open')
|
||||
!isActive && li.toggleClass('open')
|
||||
return false
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue