From 6b017b9bea37629d0ee9bcd99e8e34b91aa3b5c0 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 15 Oct 2012 15:17:59 +0200 Subject: fixed reference to this.tip() so it works in delegate events --- js/bootstrap-tooltip.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'js/bootstrap-tooltip.js') 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 () { -- cgit v1.2.3