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
diff options
context:
space:
mode:
Diffstat (limited to 'js/bootstrap-tooltip.js')
-rw-r--r--js/bootstrap-tooltip.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js
index ed62885316..153ecc4074 100644
--- a/js/bootstrap-tooltip.js
+++ b/js/bootstrap-tooltip.js
@@ -1,5 +1,5 @@
/* ===========================================================
- * bootstrap-tooltip.js v2.1.1
+ * bootstrap-tooltip.js v2.2.0
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
@@ -119,9 +119,9 @@
inside = /in/.test(placement)
$tip
- .remove()
+ .detach()
.css({ top: 0, left: 0, display: 'block' })
- .appendTo(inside ? this.$element : document.body)
+ .insertAfter(this.$element)
pos = this.getPosition(inside)
@@ -144,7 +144,7 @@
}
$tip
- .css(tp)
+ .offset(tp)
.addClass(placement)
.addClass('in')
}
@@ -166,18 +166,18 @@
function removeWithAnimation() {
var timeout = setTimeout(function () {
- $tip.off($.support.transition.end).remove()
+ $tip.off($.support.transition.end).detach()
}, 500)
$tip.one($.support.transition.end, function () {
clearTimeout(timeout)
- $tip.remove()
+ $tip.detach()
})
}
$.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() :
- $tip.remove()
+ $tip.detach()
return this
}
@@ -235,8 +235,9 @@
this.enabled = !this.enabled
}
- , toggle: function () {
- this[this.tip().hasClass('in') ? 'hide' : 'show']()
+ , toggle: function (e) {
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+ self[self.tip().hasClass('in') ? 'hide' : 'show']()
}
, destroy: function () {
@@ -269,7 +270,7 @@
, trigger: 'hover'
, title: ''
, delay: 0
- , html: true
+ , html: false
}
-}(window.jQuery);
+}(window.jQuery); \ No newline at end of file