Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorfat <jacobthornton@gmail.com>2013-08-18 07:28:58 +0400
committerfat <jacobthornton@gmail.com>2013-08-18 07:28:58 +0400
commit734b6acf132d339995462b8949ab1d2fc9524cd1 (patch)
treed6dfc4d892ebb88f492bca47da96f44d8afa4210 /js
parent06c3d87973207d4e9c4551572a8db0a08e422f37 (diff)
add small fix for tooltip consistency + fix customizer syntax issue
Diffstat (limited to 'js')
-rw-r--r--js/tooltip.js14
-rw-r--r--js/transition.js2
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)