1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05: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()
}