diff options
| author | fat <[email protected]> | 2013-08-17 20:28:58 -0700 |
|---|---|---|
| committer | fat <[email protected]> | 2013-08-17 20:28:58 -0700 |
| commit | 734b6acf132d339995462b8949ab1d2fc9524cd1 (patch) | |
| tree | d6dfc4d892ebb88f492bca47da96f44d8afa4210 /js/tooltip.js | |
| parent | 06c3d87973207d4e9c4551572a8db0a08e422f37 (diff) | |
| download | bootstrap-734b6acf132d339995462b8949ab1d2fc9524cd1.tar.xz bootstrap-734b6acf132d339995462b8949ab1d2fc9524cd1.zip | |
add small fix for tooltip consistency + fix customizer syntax issue
Diffstat (limited to 'js/tooltip.js')
| -rw-r--r-- | js/tooltip.js | 14 |
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) |
