diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index 26db854611..8be8f13c06 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 }) })