aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-11-05 17:06:41 -0700
committerJacob Thornton <[email protected]>2011-11-05 17:06:41 -0700
commitf03679805e843674736dd84ae165f96b2d6983e5 (patch)
tree93b784bc09324aef4bee27d39667a2db4fd71c48 /js
parent32086c7de59b9a17701aa689225e369d15ac454a (diff)
downloadbootstrap-f03679805e843674736dd84ae165f96b2d6983e5.tar.xz
bootstrap-f03679805e843674736dd84ae165f96b2d6983e5.zip
update to jquery 1.7 + add toggle method to twipsy/popover
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-twipsy.js9
1 files changed, 5 insertions, 4 deletions
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 = $('<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']()
+ }
+
}