aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-tooltip.js
diff options
context:
space:
mode:
authorMartin Stein <[email protected]>2012-10-15 15:17:59 +0200
committerMartin Stein <[email protected]>2012-10-15 15:17:59 +0200
commit6b017b9bea37629d0ee9bcd99e8e34b91aa3b5c0 (patch)
treea8e363f6c7d10eb59ad161f8f6d77d1086b4c2a1 /js/bootstrap-tooltip.js
parentfa778792c5a00577cc2f59f70499b60bda2a8457 (diff)
downloadbootstrap-6b017b9bea37629d0ee9bcd99e8e34b91aa3b5c0.tar.xz
bootstrap-6b017b9bea37629d0ee9bcd99e8e34b91aa3b5c0.zip
fixed reference to this.tip() so it works in delegate events
Diffstat (limited to 'js/bootstrap-tooltip.js')
-rw-r--r--js/bootstrap-tooltip.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js
index 14e48c856..d5c2def29 100644
--- a/js/bootstrap-tooltip.js
+++ b/js/bootstrap-tooltip.js
@@ -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 () {