diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 26db85461..8be8f13c0 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -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 }) })