Skip to content

Commit

Permalink
update to jquery 1.7 + add toggle method to twipsy/popover
Browse files Browse the repository at this point in the history
  • Loading branch information
fat committed Nov 6, 2011
1 parent 32086c7 commit f036798
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bootstrap.css
Expand Up @@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Fri Nov 4 13:44:15 PDT 2011
* Date: Sat Nov 5 17:05:04 PDT 2011
*/
/* Reset.less
* Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Expand Up @@ -2024,7 +2024,7 @@ <h3>Ways to compile</h3>


<!-- Le javascript -->
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script src="http://autobahn.tablesorter.com/jquery.tablesorter.min.js"></script>
<script src="assets/js/google-code-prettify/prettify.js"></script>
<script>$(function () { prettyPrint() })</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/javascript.html
Expand Up @@ -12,7 +12,7 @@
<![endif]-->

<!-- Le javascript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script src="assets/js/google-code-prettify/prettify.js"></script>
<script>$(function () { prettyPrint() })</script>
<script src="../js/bootstrap-modal.js"></script>
Expand Down
9 changes: 5 additions & 4 deletions js/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

0 comments on commit f036798

Please sign in to comment.