aboutsummaryrefslogtreecommitdiff
path: root/js/tooltip.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-08-17 22:39:07 -0700
committerMark Otto <[email protected]>2013-08-17 22:39:07 -0700
commit18766db63423e9151d1be4de061016b7a53ff8a1 (patch)
tree07c1170429e6e22caba90d72948460f379d989e3 /js/tooltip.js
parent5e31478a91e62fc022ba0141acf27937c9dd7719 (diff)
parent04a73ebe42b8beb9567220fe31cc11057badf40f (diff)
downloadbootstrap-18766db63423e9151d1be4de061016b7a53ff8a1.tar.xz
bootstrap-18766db63423e9151d1be4de061016b7a53ff8a1.zip
Merge branch '3.0.0-wip' into bs3_homepage
Conflicts: dist/css/bootstrap.min.css
Diffstat (limited to 'js/tooltip.js')
-rw-r--r--js/tooltip.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/js/tooltip.js b/js/tooltip.js
index e0732a5a9..89802287a 100644
--- a/js/tooltip.js
+++ b/js/tooltip.js
@@ -108,10 +108,11 @@
clearTimeout(self.timeout)
+ self.hoverState = 'in'
+
if (!self.options.delay || !self.options.delay.show) return self.show()
- self.hoverState = 'in'
- self.timeout = setTimeout(function () {
+ self.timeout = setTimeout(function () {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
@@ -122,10 +123,11 @@
clearTimeout(self.timeout)
+ self.hoverState = 'out'
+
if (!self.options.delay || !self.options.delay.hide) return self.hide()
- self.hoverState = 'out'
- self.timeout = setTimeout(function () {
+ self.timeout = setTimeout(function () {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
@@ -258,7 +260,9 @@
var $tip = this.tip()
var e = $.Event('hide.bs.' + this.type)
- function complete() { $tip.detach() }
+ function complete() {
+ if (that.hoverState != 'in') $tip.detach()
+ }
this.$element.trigger(e)