1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 13:29:06 +02:00

update to jquery 1.7 + add toggle method to twipsy/popover

This commit is contained in:
Jacob Thornton
2011-11-05 17:06:41 -07:00
parent 32086c7de5
commit f03679805e
4 changed files with 8 additions and 7 deletions

View File

@@ -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() {
@@ -194,6 +191,10 @@
this.enabled = !this.enabled
}
, toggle: function () {
this[this.tip().hasClass('in') ? 'hide' : 'show']()
}
}