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:
9
js/bootstrap-twipsy.js
vendored
9
js/bootstrap-twipsy.js
vendored
@@ -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']()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user