diff options
author | Mark Otto <otto@github.com> | 2012-12-20 12:02:52 +0400 |
---|---|---|
committer | Mark Otto <otto@github.com> | 2012-12-20 12:02:52 +0400 |
commit | 72f13e2870c431f132b9f63cc9d7e87bc6810425 (patch) | |
tree | ca5e4d8cbbcd3f3ef57ac04fad009d39fbf7b89a /js/bootstrap-dropdown.js | |
parent | 14844db862a61c92be982921e14a526484f3b8a9 (diff) | |
parent | 9726fded1c587c14b57a61a92b88ac74fe21d320 (diff) |
Merge branch '2.2.3' into 3.0.0-wip
Conflicts:
Makefile
README.md
component.json
docs/assets/css/bootstrap-responsive.css
docs/assets/css/bootstrap.css
docs/assets/js/bootstrap-affix.js
docs/assets/js/bootstrap-alert.js
docs/assets/js/bootstrap-button.js
docs/assets/js/bootstrap-carousel.js
docs/assets/js/bootstrap-collapse.js
docs/assets/js/bootstrap-dropdown.js
docs/assets/js/bootstrap-modal.js
docs/assets/js/bootstrap-popover.js
docs/assets/js/bootstrap-scrollspy.js
docs/assets/js/bootstrap-tab.js
docs/assets/js/bootstrap-tooltip.js
docs/assets/js/bootstrap-transition.js
docs/assets/js/bootstrap-typeahead.js
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.min.js
docs/index.html
docs/templates/pages/base-css.mustache
docs/templates/pages/index.mustache
docs/templates/pages/javascript.mustache
js/bootstrap-affix.js
js/bootstrap-alert.js
js/bootstrap-button.js
js/bootstrap-carousel.js
js/bootstrap-collapse.js
js/bootstrap-dropdown.js
js/bootstrap-modal.js
js/bootstrap-popover.js
js/bootstrap-scrollspy.js
js/bootstrap-tab.js
js/bootstrap-tooltip.js
js/bootstrap-transition.js
js/bootstrap-typeahead.js
less/bootstrap.less
less/responsive.less
less/type.less
package.json
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 65fc3ea86a..93d645970d 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 } |