diff options
| author | Mark Otto <[email protected]> | 2012-12-19 23:39:40 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2012-12-19 23:39:40 -0800 |
| commit | 5d776bcfd2e7da0bcce37252dc983149d8b2d377 (patch) | |
| tree | 0b46eb3b33008f4d4b4ea3bd73ce82ed77218d7d /js/bootstrap-dropdown.js | |
| parent | dc6142751feced6761f67503323c0c6e62844d4e (diff) | |
| parent | bbe4625672c5122bb2b06c495f9ea41752c10467 (diff) | |
| download | bootstrap-5d776bcfd2e7da0bcce37252dc983149d8b2d377.tar.xz bootstrap-5d776bcfd2e7da0bcce37252dc983149d8b2d377.zip | |
Merge branch '2.2.3' of github.com:twitter/bootstrap into 2.2.3
Diffstat (limited to 'js/bootstrap-dropdown.js')
| -rw-r--r-- | js/bootstrap-dropdown.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js index f97a81f35..914eabde7 100644 --- a/js/bootstrap-dropdown.js +++ b/js/bootstrap-dropdown.js @@ -115,8 +115,9 @@ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } - $parent = $(selector) - $parent.length || ($parent = $this.parent()) + $parent = selector && $(selector) + + if (!$parent || !$parent.length) $parent = $this.parent() return $parent } |
