From f03679805e843674736dd84ae165f96b2d6983e5 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 5 Nov 2011 17:06:41 -0700 Subject: update to jquery 1.7 + add toggle method to twipsy/popover --- js/bootstrap-twipsy.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/bootstrap-twipsy.js b/js/bootstrap-twipsy.js index 7f8ad0fed..e249c815d 100644 --- a/js/bootstrap-twipsy.js +++ b/js/bootstrap-twipsy.js @@ -168,10 +168,7 @@ } , tip: function() { - if (!this.$tip) { - this.$tip = $('
').html(this.options.template) - } - return this.$tip + return this.$tip = this.$tip || $('
').html(this.options.template) } , validate: function() { @@ -194,6 +191,10 @@ this.enabled = !this.enabled } + , toggle: function () { + this[this.tip().hasClass('in') ? 'hide' : 'show']() + } + } -- cgit v1.2.3