Skip to content

Commit

Permalink
Update Bootstrap's Twipsy JS
Browse files Browse the repository at this point in the history
  • Loading branch information
zachwill committed Nov 6, 2011
1 parent 0d9f80f commit fd0aa82
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions public/js/libs/bootstrap-twipsy.js
Expand Up @@ -168,10 +168,7 @@
}

, tip: function() {
if (!this.$tip) {
this.$tip = $('<div class="twipsy" />').html(this.options.template)
}
return this.$tip
return this.$tip = this.$tip || $('<div class="twipsy" />').html(this.options.template)
}

, validate: function() {
Expand All @@ -194,6 +191,10 @@
this.enabled = !this.enabled
}

, toggle: function () {
this[this.tip().hasClass('in') ? 'hide' : 'show']()
}

}


Expand Down Expand Up @@ -307,4 +308,4 @@
return $.extend({}, options, $(ele).data())
}

}( window.jQuery || window.ender );
}( window.jQuery || window.ender );

0 comments on commit fd0aa82

Please sign in to comment.