diff options
author | fat <jacobthornton@gmail.com> | 2013-08-18 07:28:58 +0400 |
---|---|---|
committer | fat <jacobthornton@gmail.com> | 2013-08-18 07:28:58 +0400 |
commit | 734b6acf132d339995462b8949ab1d2fc9524cd1 (patch) | |
tree | d6dfc4d892ebb88f492bca47da96f44d8afa4210 /js | |
parent | 06c3d87973207d4e9c4551572a8db0a08e422f37 (diff) |
add small fix for tooltip consistency + fix customizer syntax issue
Diffstat (limited to 'js')
-rw-r--r-- | js/tooltip.js | 14 | ||||
-rw-r--r-- | js/transition.js | 2 |
2 files changed, 10 insertions, 6 deletions
diff --git a/js/tooltip.js b/js/tooltip.js index e0732a5a9d..89802287a3 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) diff --git a/js/transition.js b/js/transition.js index 0cdcf9ea3d..e8f318beb7 100644 --- a/js/transition.js +++ b/js/transition.js @@ -42,7 +42,7 @@ // http://blog.alexmaccaw.com/css-transitions $.fn.emulateTransitionEnd = function (duration) { - var called = false, $el = this + var called = false, $el = this $(this).one($.support.transition.end, function () { called = true }) var callback = function () { if (!called) $($el).trigger($.support.transition.end) } setTimeout(callback, duration) |