From: Jacob Thornton Date: Thu, 22 Mar 2012 04:57:06 +0000 (-0700) Subject: clear timeout to reset delays for tooltip/popover X-Git-Tag: v2.0.3~5^2~108^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94b24aaa473755093677cb4eb80faf3daee53357;p=thirdparty%2Fbootstrap.git clear timeout to reset delays for tooltip/popover --- diff --git a/docs/assets/bootstrap.zip b/docs/assets/bootstrap.zip index a4e3982293..4742135efa 100644 Binary files a/docs/assets/bootstrap.zip and b/docs/assets/bootstrap.zip differ diff --git a/docs/assets/js/bootstrap-tooltip.js b/docs/assets/js/bootstrap-tooltip.js index 2b5f146b13..7d58a6c8d2 100644 --- a/docs/assets/js/bootstrap-tooltip.js +++ b/docs/assets/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() } diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 2b5f146b13..7d58a6c8d2 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() }