Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorfat <jacobthornton@gmail.com>2012-12-20 10:26:36 +0400
committerfat <jacobthornton@gmail.com>2012-12-20 10:26:36 +0400
commit96e5fa6143072db64f34482873c6f7d6b3ec4ffd (patch)
tree09c45192eebbf31073589a4777791a1159cfc97d /js
parent7c456c85545b433759913051779bf4af9b000d48 (diff)
whitespace in tooltip + don't pass empty selector to $() in dropdown.js
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-dropdown.js5
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
}