diff options
author | fat <jacobthornton@gmail.com> | 2012-12-20 10:26:36 +0400 |
---|---|---|
committer | fat <jacobthornton@gmail.com> | 2012-12-20 10:26:36 +0400 |
commit | 96e5fa6143072db64f34482873c6f7d6b3ec4ffd (patch) | |
tree | 09c45192eebbf31073589a4777791a1159cfc97d /js | |
parent | 7c456c85545b433759913051779bf4af9b000d48 (diff) |
whitespace in tooltip + don't pass empty selector to $() in dropdown.js
Diffstat (limited to '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 f97a81f356..914eabde75 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 } |