0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00

clear timeout to reset delays for tooltip/popover

This commit is contained in:
Jacob Thornton 2012-03-21 21:57:06 -07:00
parent 22963d7346
commit 94b24aaa47
3 changed files with 8 additions and 4 deletions

Binary file not shown.

View File

@ -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()
}

View File

@ -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()
}