aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-tooltip.js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-03-21 21:57:06 -0700
committerJacob Thornton <[email protected]>2012-03-21 21:57:06 -0700
commit94b24aaa473755093677cb4eb80faf3daee53357 (patch)
tree43bbec6a31bdcba10a30b4a10a8bcb507321c245 /js/bootstrap-tooltip.js
parent22963d73467a604b845dbebc03c9b8fa16ba2e23 (diff)
downloadbootstrap-94b24aaa473755093677cb4eb80faf3daee53357.tar.xz
bootstrap-94b24aaa473755093677cb4eb80faf3daee53357.zip
clear timeout to reset delays for tooltip/popover
Diffstat (limited to 'js/bootstrap-tooltip.js')
-rw-r--r--js/bootstrap-tooltip.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js
index 2b5f146b1..7d58a6c8d 100644
--- a/js/bootstrap-tooltip.js
+++ b/js/bootstrap-tooltip.js
@@ -73,8 +73,9 @@
if (!self.options.delay || !self.options.delay.show) {
self.show()
} else {
+ clearTimeout(this.timeout)
self.hoverState = 'in'
- setTimeout(function() {
+ this.timeout = setTimeout(function() {
if (self.hoverState == 'in') {
self.show()
}
@@ -88,8 +89,9 @@
if (!self.options.delay || !self.options.delay.hide) {
self.hide()
} else {
+ clearTimeout(this.timeout)
self.hoverState = 'out'
- setTimeout(function() {
+ this.timeout = setTimeout(function() {
if (self.hoverState == 'out') {
self.hide()
}