diff options
| author | Rod Vagg <[email protected]> | 2011-11-06 12:41:55 +1100 |
|---|---|---|
| committer | Rod Vagg <[email protected]> | 2011-11-06 12:41:55 +1100 |
| commit | 3628eb79ae42ca1c398d190ca5e96108f3cd353b (patch) | |
| tree | 76b8a76a77bdfe28171712e73290523618d8dd39 /js | |
| parent | f6a258ef36c0e9383b35e8f33cda14ba4718e0f3 (diff) | |
| parent | c3c700fd02dc1fbd096bd5926960dd9b80b8169d (diff) | |
| download | bootstrap-3628eb79ae42ca1c398d190ca5e96108f3cd353b.tar.xz bootstrap-3628eb79ae42ca1c398d190ca5e96108f3cd353b.zip | |
Merge branch 'master' into poveropt
Diffstat (limited to 'js')
| -rw-r--r-- | js/bootstrap-twipsy.js | 9 |
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']() + } + } |
