diff options
| author | Mark Otto <[email protected]> | 2012-01-08 14:33:52 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-01-08 14:33:52 -0800 |
| commit | ac68bc39ff46aec1d4654165eb64c2dc11f5e968 (patch) | |
| tree | ceab3321ac91d267030639c24e4ab6815c5d84ee /js/bootstrap-dropdown.js | |
| parent | 2c790304393cce3ba7db3b3d5bc9385b1986b838 (diff) | |
| parent | 5a33c1b96e13a4650a127b0e81a91eb235561170 (diff) | |
| download | bootstrap-ac68bc39ff46aec1d4654165eb64c2dc11f5e968.tar.xz bootstrap-ac68bc39ff46aec1d4654165eb64c2dc11f5e968.zip | |
Merge branch '2.0-wip' of github.com:twitter/bootstrap into 2.0-wip
Diffstat (limited to 'js/bootstrap-dropdown.js')
| -rw-r--r-- | js/bootstrap-dropdown.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index d846f1af1..3cb261992 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -38,12 +38,14 @@ var $this = $(this) , selector = $this.attr('data-target') || $this.attr('href') , $parent = $(selector) + , isActive $parent.length || ($parent = $this.parent()) + isActive = $parent.hasClass('open') clearMenus() - !$parent.hasClass('open') && $parent.toggleClass('open') + !isActive && $parent.toggleClass('open') return false } |
