diff --git a/public/js/libs/bootstrap-twipsy.js b/public/js/libs/bootstrap-twipsy.js index 7f8ad0f..ba278a4 100644 --- a/public/js/libs/bootstrap-twipsy.js +++ b/public/js/libs/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']() + } + } @@ -307,4 +308,4 @@ return $.extend({}, options, $(ele).data()) } -}( window.jQuery || window.ender ); \ No newline at end of file +}( window.jQuery || window.ender );