mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
clean up js api for dropdowns
This commit is contained in:
Vendored
+4
-2
@@ -27,7 +27,10 @@
|
||||
|
||||
var toggle = '[data-toggle="dropdown"]'
|
||||
, Dropdown = function ( element ) {
|
||||
$(element).bind('click', this.toggle)
|
||||
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
||||
$('html').on('click.dropdown.data-api', function () {
|
||||
$el.parent().removeClass('open')
|
||||
})
|
||||
}
|
||||
|
||||
Dropdown.prototype = {
|
||||
@@ -51,7 +54,6 @@
|
||||
isActive = $parent.hasClass('open')
|
||||
|
||||
clearMenus()
|
||||
|
||||
!isActive && $parent.toggleClass('open')
|
||||
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user