mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-05-15 11:59:39 +03:00
clicking open dropdown shoud close it
This commit is contained in:
Vendored
+4
-1
@@ -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
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user