Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2011-11-21 08:58:04 +0400
committerJacob Thornton <jacobthornton@gmail.com>2011-11-21 08:58:04 +0400
commitbc65b58551575c9dfb2e4d9f4f7af97009e39432 (patch)
treecb27a6f15bfdd7650871f6f6aa5aba496201bd29
parent0b1d5d9189ea82cde5e848e5a8771a8f4850e21f (diff)
merge in js from 1.4... start working through js docs
-rw-r--r--Makefile2
-rw-r--r--bootstrap.css12
-rw-r--r--bootstrap.min.css2
-rw-r--r--docs/assets/css/docs.css7
-rw-r--r--docs/base-css.html2
-rw-r--r--docs/javascript.html356
-rw-r--r--js/bootstrap-alerts.js44
-rw-r--r--js/bootstrap-dropdown.js43
-rw-r--r--js/bootstrap-modal.js48
-rw-r--r--js/bootstrap-popover.js6
-rw-r--r--js/bootstrap-scrollspy.js33
-rw-r--r--js/bootstrap-tabs.js2
-rw-r--r--js/bootstrap-transitions.js2
-rw-r--r--js/bootstrap-twipsy.js68
-rw-r--r--lib/twipsy.less4
15 files changed, 281 insertions, 350 deletions
diff --git a/Makefile b/Makefile
index b3dce89ac4..294f0ed72e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION=1.2.0
+VERSION=2.0.0
DATE=$(shell DATE)
BOOTSTRAP = ./bootstrap.css
BOOTSTRAP_MIN = ./bootstrap.min.css
diff --git a/bootstrap.css b/bootstrap.css
index e17c454d5c..d6cc76b6d8 100644
--- a/bootstrap.css
+++ b/bootstrap.css
@@ -1,12 +1,12 @@
/*!
- * Bootstrap v1.2.0
+ * Bootstrap v2.0.0
*
* Copyright 2011 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
- * Date: Sun Nov 20 18:13:58 PST 2011
+ * Date: Sun Nov 20 20:05:48 PST 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).
@@ -2269,11 +2269,11 @@ button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
visibility: visible;
padding: 5px;
font-size: 11px;
- filter: alpha(opacity=80);
- -moz-opacity: 0.8;
- opacity: 0.8;
+ filter: alpha(opacity=0);
+ -moz-opacity: 0;
+ opacity: 0;
}
-.twipsy.fade.in {
+.twipsy.in {
filter: alpha(opacity=80);
-moz-opacity: 0.8;
opacity: 0.8;
diff --git a/bootstrap.min.css b/bootstrap.min.css
index e0584b480f..69441b76e7 100644
--- a/bootstrap.min.css
+++ b/bootstrap.min.css
@@ -329,7 +329,7 @@ button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;
.modal-footer{padding:14px 15px 15px;margin-bottom:0;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;}.modal-footer:before,.modal-footer:after{display:table;*display:inline;content:"";zoom:1;}
.modal-footer:after{clear:both;}
.modal-footer .btn{float:right;margin-left:5px;}
-.twipsy{position:absolute;z-index:1000;display:block;visibility:visible;padding:5px;font-size:11px;filter:alpha(opacity=80);-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-moz-opacity:0.8;opacity:0.8;}
+.twipsy{position:absolute;z-index:1000;display:block;visibility:visible;padding:5px;font-size:11px;filter:alpha(opacity=0);-moz-opacity:0;opacity:0;}.twipsy.in{filter:alpha(opacity=80);-moz-opacity:0.8;opacity:0.8;}
.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css
index b503c23e43..cde8ff1e0d 100644
--- a/docs/assets/css/docs.css
+++ b/docs/assets/css/docs.css
@@ -304,6 +304,13 @@ body > .navbar-fixed .brand:hover {
margin-left: 10px;
}
+/* scrollspy docs */
+
+.scrollspy-example {
+ overflow: auto;
+ height: 200px;
+ position: relative;
+}
/* Popover docs
-------------------------------------------------- */
diff --git a/docs/base-css.html b/docs/base-css.html
index aa4a2ebfc0..11346b5b02 100644
--- a/docs/base-css.html
+++ b/docs/base-css.html
@@ -37,7 +37,7 @@
<li><a href="./scaffolding.html">Scaffolding</a></li>
<li class="active"><a href="./base-css.html">Base CSS</a></li>
<li><a href="./components.html">Components</a></li>
- <li><a href="./javascript.html">Javascript</a></li>
+ <li><a href="./javascript.html">Javascript plugins</a></li>
<li><a href="./less.html">Using LESS</a></li>
</ul>
</div>
diff --git a/docs/javascript.html b/docs/javascript.html
index a962e043c8..c9709d35fb 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -22,6 +22,40 @@
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
+
+ <!-- Le javascript -->
+ <!-- placed up here so that the inline demos can be next to their markup -->
+ <script src="http://code.jquery.com/jquery-1.7.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>
+ <script src="../js/bootstrap-transitions.js"></script>
+ <script src="../js/bootstrap-alerts.js"></script>
+ <script src="../js/bootstrap-modal.js"></script>
+ <script src="../js/bootstrap-dropdown.js"></script>
+ <script src="../js/bootstrap-scrollspy.js"></script>
+ <script src="../js/bootstrap-tabs.js"></script>
+ <script src="../js/bootstrap-twipsy.js"></script>
+ <script src="../js/bootstrap-popover.js"></script>
+ <script>
+ $(function () {
+
+ // twipsy demo
+ $("a[rel=twipsy]").twipsy({
+ live: true
+ })
+
+ //popover demo
+ $("a[rel=popover]")
+ .popover({
+ offset: 10
+ })
+ .click(function(e) {
+ e.preventDefault()
+ })
+ })
+ </script>
+
</head>
<body id="bootstrap-js">
@@ -44,26 +78,6 @@
</div>
</div>
-<!--
- <div class="navbar navbar-fixed" data-scrollspy="scrollspy">
- <div class="navbar-inner">
- <div class="container">
- <a class="brand" href="./index.html">Bootstrap</a>
- <ul class="nav">
- <li><a href="#overview">Overview</a></li>
- <li><a href="#modal">Modals</a></li>
- <li><a href="#dropdown">Dropdown</a></li>
- <li><a href="#scrollspy">ScrollSpy</a></li>
- <li><a href="#tabs">Tabs</a></li>
- <li><a href="#twipsy">Twipsy</a></li>
- <li><a href="#popover">Popover</a></li>
- <li><a href="#alerts">Alerts</a></li>
- </ul>
- </div>
- </div>
- </div>
- -->
-
<div class="container">
<!-- Masthead
================================================== -->
@@ -105,7 +119,7 @@
<td>The alert plugin is a super tiny class for adding close functionality to alerts.</td>
</tr>
<tr>
- <td><a href="./javascript.html#dropdowns">bootstrap-dropdown.js</a></td>
+ <td><a href="./javascript.html#dropdown">bootstrap-dropdown.js</a></td>
<td>This plugin is for adding dropdown interaction to the bootstrap navbar or tabbed navigations.</td>
</tr>
<tr>
@@ -164,35 +178,35 @@
<tr>
<td>backdrop</td>
<td>boolean</td>
- <td>false</td>
+ <td>true</td>
<td>Includes a modal-backdrop element</td>
</tr>
<tr>
<td>keyboard</td>
<td>boolean</td>
- <td>false</td>
+ <td>true</td>
<td>Closes the modal when escape key is pressed</td>
</tr>
<tr>
<td>show</td>
<td>boolean</td>
- <td>false</td>
+ <td>true</td>
<td>Opens modal on class initialization</td>
</tr>
</tbody>
</table>
<h3>Markup</h3>
- <p>You can activate modals on your page easily without having to write a single line of javascript. Just give an element a <code>data-controls-modal</code> attribute which corresponds to a modal element id, and when clicked, it will launch your modal. To add modal options, just include them as data attributes as well.</p>
+ <p>You can activate modals on your page easily without having to write a single line of javascript. Just give an element a <code>data-controls-modal</code> attribute which corresponds to a modal element id, and when clicked, it will launch your modal. To add modal options, just include them as data attributes.</p>
<pre class="prettyprint linenums">
&lt;a class="btn" data-controls-modal="my-modal" data-backdrop="true" &gt;Launch Modal&lt;/a&gt;
</pre>
- <p><span class="label notice">Notice</span> If you want your modal to animate in and out, just add a <code>.fade</code> class to your <code>.modal</code> element (refer to the demo to see this in action).</p>
+ <p><span class="label notice">Notice</span> If you want your modal to animate in and out, just add a <code>.fade</code> class to the <code>.modal</code> element (refer to the demo to see this in action).</p>
<h3>Methods</h3>
<h4>.modal(options)</h4>
<p>Activates your content as a modal. Accepts an optional options <code>object</code>.
<pre class="prettyprint linenums">
$('#my-modal').modal({
- closeOnEscape: true
+ keyboard: false
})</pre>
<h4>.modal('toggle')</h4>
<p>Manually toggles a modal.</p>
@@ -203,10 +217,6 @@ $('#my-modal').modal({
<h4>.modal('hide')</h4>
<p>Manually hides a modal.</p>
<pre class="prettyprint linenums">$('#my-modal').modal('hide')</pre>
- <h4>.modal(true)</h4>
- <p>Returns an elements modal class instance.</p>
- <pre class="prettyprint linenums">$('#my-modal').modal(true)</pre>
- <p><span class="label notice">Notice</span> Alternatively, this can be retrieved with <code>$().data('modal')</code>.</p>
<h3>Events</h3>
<p>Bootstrap's modal class exposes a few events for hooking into modal functionality. </p>
<table class="striped-table">
@@ -255,7 +265,7 @@ $('#my-modal').bind('hidden', function () {
<a href="#" class="btn" data-modal-dismiss="true" >Close</a>
</div>
</div>
- <button data-controls-modal="modal-from-dom" data-backdrop="true" data-keyboard="true" class="btn danger">Launch Modal</button>
+ <button data-controls-modal="modal-from-dom" class="btn danger">Launch Modal</button>
</div>
</div>
</section>
@@ -275,14 +285,14 @@ $('#my-modal').bind('hidden', function () {
</div>
<div class="span9 columns">
<h3>Using boostrap-dropdown.js</h3>
- <pre class="prettyprint linenums">$('#navbar').dropdown()</pre>
+ <pre class="prettyprint linenums">$('.dropdown-toggle').dropdown()</pre>
<h3>Markup</h3>
- <p>To quickly add dropdown functionality to any nav element, use the <code>data-dropdown</code> attribute. Any valid bootstrap dropdown will automatically be activated.</p>
+ <p>To quickly add dropdown functionality to any element just add <code>data-toggle="dropdown"</code>. Any valid bootstrap dropdown will automatically be activated.</p>
<pre class="prettyprint linenums">
&lt;ul class="tabs"&gt;
&lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
- &lt;li class="dropdown" data-dropdown="true" &gt;
- &lt;a href="#" class="dropdown-toggle"&gt;Dropdown&lt;/a&gt;
+ &lt;li class="dropdown"&gt;
+ &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;Dropdown&lt;/a&gt;
&lt;ul class="dropdown-menu"&gt;
&lt;li&gt;&lt;a href="#"&gt;Secondary link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;Something else here&lt;/a&gt;&lt;/li&gt;
@@ -310,7 +320,7 @@ $('#my-modal').bind('hidden', function () {
</form>
<ul class="nav secondary-nav">
<li class="dropdown">
- <a href="#" class="dropdown-toggle" data-dropdown="true">Dropdown 1</a>
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown 1</a>
<ul class="dropdown-menu">
<li><a href="#">Secondary link</a></li>
<li><a href="#">Something else here</a></li>
@@ -319,7 +329,7 @@ $('#my-modal').bind('hidden', function () {
</ul>
</li>
<li class="dropdown">
- <a href="#" class="dropdown-toggle" data-dropdown="true">Dropdown 2</a>
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2</a>
<ul class="dropdown-menu">
<li><a href="#">Secondary link</a></li>
<li><a href="#">Something else here</a></li>
@@ -351,21 +361,60 @@ $('#my-modal').bind('hidden', function () {
<h2>Using boostrap-scrollspy.js</h2>
<pre class="prettyprint linenums">$('#navbar').dropdown()</pre>
<h3>Markup</h3>
- <p>To easily add scrollspy behavior to your nav, just add the <code>data-scrollspy</code> attribute to the <code>.navbar</code>.
- <pre class="prettyprint linenums">&lt;div class="navbar" data-scrollspy="scrollspy" &gt;...&lt;/div&gt;</pre>
- <h3>Methods</h3>
- <h4>$().scrollspy()</h4>
- <p>
- Auto activates navigation buttons by users scroll position.
- </p>
- <pre class="prettyprint linenums">$('body > .navbar').scrollSpy()</pre>
+ <p>To easily add scrollspy behavior to your topbar navigation, just add <code>data-spy="scroll"</code> to the element you want to spy on (most typically this would be the body).
+ <pre class="prettyprint linenums">&lt;body data-spy="scroll" &gt;...&lt;/body&gt;</pre>
<p><span class="label notice">Notice</span> Navbar anchor tags must have resolvable id targets. For example, a <code>&lt;a href="#home"&gt;home&lt;/a&gt;</code> must correspond to something in the dom like <code>&lt;div id="home"&gt;&lt;/div&gt;</code>.
- </p>
- <h4>.scrollspy('refresh')</h4>
- <p>The scrollspy caches nav buttons and section coordinates for performance. If you need to update this cache (likely if you have dynamic content) just call this refresh method. If you used the data attribute to define your scrollspy, just call refresh on the body.</p>
- <pre class="prettyprint linenums">$('body').scrollspy('refresh')</pre>
<h3>Demo</h3>
- <p>Checkout the the navbar navigation on this page.</p>
+ <p>
+ Scroll the area below and watch the navigation update. The dropdown sub items will be highlighted as well. Try it!</p>
+ <p>
+
+ <div id="navbar-example" class="navbar navbar-static">
+ <div class="navbar-inner">
+ <div class="container" style="width: auto;">
+ <a class="brand" href="#">Project Name</a>
+ <ul class="nav">
+ <li><a href="#fat">@fat</a></li>
+ <li><a href="#mdo">@mdo</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
+ <ul class="dropdown-menu">
+ <li><a href="#one">one</a></li>
+ <li><a href="#two">two</a></li>
+ <li class="divider"></li>
+ <li><a href="#three">three</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <div data-spy="scroll" class="scrollspy-example">
+ <h4 id="fat">@fat</h4>
+ <p>
+ Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
+ </p>
+ <h4 id="mdo">@mdo</h4>
+ <p>
+ Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.
+ </p>
+ <h4 id="one">one</h4>
+ <p>
+ Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.
+ </p>
+ <h4 id="two">two</h4>
+ <p>
+ In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.
+ </p>
+ <h4 id="three">three</h4>
+ <p>
+ Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.
+ </p>
+ <p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats.
+ </p>
+ </div>
+
</div>
</div>
</section>
@@ -414,27 +463,59 @@ $('#my-modal').bind('hidden', function () {
})
&lt;/script&gt;</pre>
</p>
+ <h3>Events</h3>
+ <table class="zebra-striped">
+ <thead>
+ <tr>
+ <th style="width: 150px;">Event</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>change</td>
+ <td>This event fires on tab change. Use <code>event.target</code> and <code>event.relatedTarget</code> to target the active tab and the previous active tab respectively.</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <pre class="prettyprint linenums">
+$('.tabs a').bind('change', function (e) {
+ e.target // activated tab
+ e.relatedTarget // previous tab
+})</pre>
<h3>Demo</h3>
- <div class="tabbable">
- <ul class="tabs" data-tabs="tabs">
- <li class="active"><a href="#home">Home</a></li>
- <li><a href="#profile">Profile</a></li>
- <li><a href="#messages">Messages</a></li>
- <li><a href="#settings">Settings</a></li>
- </ul>
- <div class="tab-content" id="myTabContent">
- <div class="tab-pane active" id="home">
- <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
- </div>
- <div class="tab-pane" id="profile">
- <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
- </div>
- <div class="tab-pane" id="messages">
- <p>Banksy do proident, brooklyn photo booth delectus sunt artisan sed organic exercitation eiusmod four loko. Quis tattooed iphone esse aliqua. Master cleanse vero fixie mcsweeney's. Ethical portland aute, irony food truck pitchfork lomo eu anim. Aesthetic blog DIY, ethical beard leggings tofu consequat whatever cardigan nostrud. Helvetica you probably haven't heard of them carles, marfa veniam occaecat lomo before they sold out in shoreditch scenester sustainable thundercats. Consectetur tofu craft beer, mollit brunch fap echo park pitchfork mustache dolor.</p>
- </div>
- <div class="tab-pane" id="settings">
- <p>Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seitan squid ad wolf bicycle rights blog. Et aute readymade farm-to-table carles 8-bit, nesciunt nulla etsy adipisicing organic ea. Master cleanse mollit high life, next level Austin nesciunt american apparel twee mustache adipisicing reprehenderit hoodie portland irony. Aliqua tofu quinoa +1 commodo eiusmod. High life williamsburg cupidatat twee homo leggings. Four loko vinyl DIY consectetur nisi, marfa retro keffiyeh vegan. Fanny pack viral retro consectetur gentrify fap.</p>
- </div>
+ <ul class="tabs" data-tabs="tabs">
+ <li class="active"><a href="#home">Home</a></li>
+ <li><a href="#profile">Profile</a></li>
+ <li><a href="#messages">Messages</a></li>
+ <li><a href="#settings">Settings</a></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
+ <ul class="dropdown-menu">
+ <li><a href="#dropdown1">@fat</a></li>
+ <li><a href="#dropdown2">@mdo</a></li>
+ </ul>
+ </li>
+ </ul>
+ <div id="my-tab-content" class="tab-content">
+ <div class="active tab-pane" id="home">
+ <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
+ </div>
+ <div class="tab-pane" id="profile">
+ <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
+ </div>
+ <div class="tab-pane" id="messages">
+ <p>Banksy do proident, brooklyn photo booth delectus sunt artisan sed organic exercitation eiusmod four loko. Quis tattooed iphone esse aliqua. Master cleanse vero fixie mcsweeney's. Ethical portland aute, irony food truck pitchfork lomo eu anim. Aesthetic blog DIY, ethical beard leggings tofu consequat whatever cardigan nostrud. Helvetica you probably haven't heard of them carles, marfa veniam occaecat lomo before they sold out in shoreditch scenester sustainable thundercats. Consectetur tofu craft beer, mollit brunch fap echo park pitchfork mustache dolor.</p>
+ </div>
+ <div class="tab-pane" id="settings">
+ <p>Sunt qui biodiesel mollit officia, fanny pack put a bird on it thundercats seitan squid ad wolf bicycle rights blog. Et aute readymade farm-to-table carles 8-bit, nesciunt nulla etsy adipisicing organic ea. Master cleanse mollit high life, next level Austin nesciunt american apparel twee mustache adipisicing reprehenderit hoodie portland irony. Aliqua tofu quinoa +1 commodo eiusmod. High life williamsburg cupidatat twee homo leggings. Four loko vinyl DIY consectetur nisi, marfa retro keffiyeh vegan. Fanny pack viral retro consectetur gentrify fap.</p>
+ </div>
+ <div class="tab-pane" id="dropdown1">
+ <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
+ </div>
+ <div class="tab-pane" id="dropdown2">
+ <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
</div>
</div>
</div>
@@ -474,36 +555,12 @@ $('#my-modal').bind('hidden', function () {
<td>apply a css fade transition to the tooltip</td>
</tr>
<tr>
- <td>delayIn</td>
- <td>number</td>
- <td>0</td>
- <td>delay before showing tooltip (ms)</td>
- </tr>
- <tr>
- <td>delayOut</td>
- <td>number</td>
- <td>0</td>
- <td>delay before hiding tooltip (ms)</td>
- </tr>
- <tr>
- <td>fallback</td>
- <td>string</td>
- <td>''</td>
- <td>text to use when no tooltip title is present</td>
- </tr>
- <tr>
<td>placement</td>
<td>string</td>
<td>'above'</td>
<td>how to position the tooltip - above | below | left | right</td>
</tr>
<tr>
- <td>html</td>
- <td>boolean</td>
- <td>false</td>
- <td>allows html content within tooltip</td>
- </tr>
- <tr>
<td>live</td>
<td>boolean</td>
<td>false</td>
@@ -516,19 +573,27 @@ $('#my-modal').bind('hidden', function () {
<td>pixel offset of tooltip from target element</td>
</tr>
<tr>
- <td>title</td>
- <td>string | function</td>
- <td>'title'</td>
- <td>attribute or method for retrieving title text</td>
- </tr>
- <tr>
<td>trigger</td>
<td>string</td>
<td>'hover'</td>
<td>how tooltip is triggered - hover | focus | manual</td>
</tr>
+ <tr>
+ <td>delay</td>
+ <td>number | object</td>
+ <td>0</td>
+ <td>
+ <p>delay showing/hiding the tooltip (ms)</p>
+ <p>If a number is supplied, delay is applied to both hide/show</p>
+ <p>Object structure is: <code>delay: { show: 500, hide: 100 }</code></p>
+ </td>
+ </tr>
</tbody>
</table>
+ <p><span class="label notice">Notice</span> Individual twipsy instance options can alternatively be specified through the use of data attributes.</code></p>
+ <h3>Markup</h3>
+ <p>Twipsy's should contain a title tag which will be use to fill the tip content.<p>
+ <pre class="prettyprint linenums">&lt;a href="#" rel='twipsy' title='twipsy text'&gt;@fat&lt;/a&gt;</pre>
<h3>Methods</h3>
<h4>$().twipsy(options)</h4>
<p>Attaches a twipsy handler to an element collection.</p>
@@ -538,22 +603,11 @@ $('#my-modal').bind('hidden', function () {
<h4>.twipsy('hide')</h4>
<p>Hides an elements twipsy.</p>
<pre class="prettyprint linenums">$('#element').twipsy('hide')</pre>
- <h4>.twipsy(true)</h4>
- <p>Returns an elements twipsy class instance.</p>
- <pre class="prettyprint linenums">$('#element').twipsy(true)</pre>
- <p><span class="label notice">Notice</span> Alternatively, this can be retrieved with <code>$().data('twipsy')</code>.</p>
<h3>Demo</h3>
<div class="well">
<p class="muted">Tight pants next level keffiyeh <a href="#" rel='twipsy' title='Some title text'>you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" rel='twipsy' title='Another twipsy'>have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A <a href="#" rel='twipsy' title='Another one here too'>really ironic</a> artisan whatever keytar, scenester farm-to-table banksy Austin <a href="#" rel='twipsy' title='The last tip!'>twitter handle</a> freegan cred raw denim single-origin coffee viral.
</p>
</div>
- <script>
- $(function () {
- $("a[rel=twipsy]").twipsy({
- live: true
- })
- })
- </script>
</div>
</div>
</section>
@@ -591,34 +645,16 @@ $('#my-modal').bind('hidden', function () {
<td>apply a css fade transition to the tooltip</td>
</tr>
<tr>
- <td>delayIn</td>
- <td>number</td>
- <td>0</td>
- <td>delay before showing tooltip (ms)</td>
- </tr>
- <tr>
- <td>delayOut</td>
- <td>number</td>
+ <td>delay</td>
+ <td>number | object</td>
<td>0</td>
- <td>delay before hiding tooltip (ms)</td>
- </tr>
- <tr>
- <td>fallback</td>
- <td>string</td>
- <td>''</td>
- <td>text to use when no tooltip title is present</td>
+ <td>delay before showing/hiding the tooltip (ms)</td>
</tr>
<tr>
<td>placement</td>
<td>string</td>
<td>'right'</td>
- <td>how to position the tooltip - above | below | left | right</td>
- </tr>
- <tr>
- <td>html</td>
- <td>boolean</td>
- <td>false</td>
- <td>allows html content within tooltip</td>
+ <td>how to position the popover - above | below | left | right</td>
</tr>
<tr>
<td>live</td>
@@ -633,18 +669,6 @@ $('#my-modal').bind('hidden', function () {
<td>pixel offset of tooltip from target element</td>
</tr>
<tr>
- <td>title</td>
- <td>string | function</td>
- <td>'title'</td>
- <td>attribute or method for retrieving title text</td>
- </tr>
- <tr>
- <td>content</td>
- <td>string | function</td>
- <td>'data-content'</td>
- <td>attribute or method for retrieving content text</td>
- </tr>
- <tr>
<td>trigger</td>
<td>string</td>
<td>'hover'</td>
@@ -652,6 +676,12 @@ $('#my-modal').bind('hidden', function () {
</tr>
</tbody>
</table>
+ <p><span class="label notice">Notice</span> Individual popover instance options can alternatively be specified through the use of data attributes.</code></p>
+ <h3>Markup</h3>
+ <p>Popover's should contain a title tag and a data-content attribute.<p>
+<pre class="prettyprint linenums">&lt;a href="#" class="btn" rel="popover" title="A Title" data-content="Some content"&gt;
+ hover for popover
+&lt;/a&gt;</pre>
<h3>Methods</h3>
<h4>$().popover(options)</h4>
<p>Initializes popovers for an element collection.</p>
@@ -663,17 +693,6 @@ $('#my-modal').bind('hidden', function () {
<pre class="prettyprint linenums">$('#element').popover('hide')</pre>
<h3>Demo</h3>
<a href="#" class="btn danger" rel="popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">hover for popover</a>
- <script>
- $(function () {
- $("a[rel=popover]")
- .popover({
- offset: 10
- })
- .click(function(e) {
- e.preventDefault()
- })
- })
- </script>
</div>
</div>
</section>
@@ -695,7 +714,8 @@ $('#my-modal').bind('hidden', function () {
<h3>Using bootstrap-alerts.js</h3>
<pre class="prettyprint linenums">$(".alert-message").alert()</pre>
<h3>Markup</h3>
- <p>Just add a <code>data-alert</code> attribute to your alert messages to automatically give them close functionality.</p>
+ <p>Just add <code>data-dismiss="alert"</code> to your close button to automatically give an alert close functionality.</p>
+ <pre class="prettyprint linenums">&lt;a class="close" data-dismiss="alert" href="#"&gt;&amp;times;&lt;/a&gt;</pre>
<h3>Methods</h3>
<h4>$().alert()</h4>
<p>Wraps all alerts with close functionality. To have your alerts animate out when closed, make sure they have the <code>.fade</code> and <code>.in</code> class already applied to them.</p>
@@ -703,12 +723,12 @@ $('#my-modal').bind('hidden', function () {
<p>Closes an alert.</p>
<pre class="prettyprint linenums">$(".alert-message").alert('close')</pre>
<h3>Demo</h3>
- <div class="alert-message warning fade in" data-alert="alert" >
- <a class="close" data-alert-dismiss="true" href="#">&times;</a>
+ <div class="alert-message warning fade in">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
<p><strong>Holy guacamole!</strong> Best check yo self, you’re not looking too good.</p>
</div>
- <div class="alert-message block-message error fade in" data-alert="alert" >
- <a class="close" data-alert-dismiss="true" href="#">&times;</a>
+ <div class="alert-message block-message error fade in">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
<p><strong>Oh snap! You got an error!</strong> Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p>
<div class="alert-actions">
<a class="btn small" href="#">Take this action</a> <a class="btn small" href="#">Or do this</a>
@@ -729,17 +749,5 @@ $('#my-modal').bind('hidden', function () {
</p>
</footer>
</div><!-- /container -->
-
- <!-- Le javascript -->
- <!-- Placed at the end of the document so the pages load faster -->
- <script src="http://code.jquery.com/jquery-1.5.2.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>
- <script src="../js/bootstrap-transitions.js"></script>
- <script src="../js/bootstrap-dropdown.js"></script>
- <script src="../js/bootstrap-twipsy.js"></script>
- <script src="../js/bootstrap-scrollspy.js"></script>
- <script src="assets/js/application.js"></script>
</body>
</html>
diff --git a/js/bootstrap-alerts.js b/js/bootstrap-alerts.js
index 3ef1672bc0..600440e40e 100644
--- a/js/bootstrap-alerts.js
+++ b/js/bootstrap-alerts.js
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-alerts.js v1.4.0
+ * bootstrap-alerts.js v2.0.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2011 Twitter, Inc.
@@ -22,34 +22,6 @@
"use strict"
- /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
- * ======================================================= */
-
- var transitionEnd
-
- $(document).ready(function () {
-
- $.support.transition = (function () {
- var thisBody = document.body || document.documentElement
- , thisStyle = thisBody.style
- , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
- return support
- })()
-
- // set CSS transition event type
- if ( $.support.transition ) {
- transitionEnd = "TransitionEnd"
- if ( $.browser.webkit ) {
- transitionEnd = "webkitTransitionEnd"
- } else if ( $.browser.mozilla ) {
- transitionEnd = "transitionend"
- } else if ( $.browser.opera ) {
- transitionEnd = "oTransitionEnd"
- }
- }
-
- })
-
/* ALERT CLASS DEFINITION
* ====================== */
@@ -76,7 +48,7 @@
}
$.support.transition && $element.hasClass('fade') ?
- $element.bind(transitionEnd, removeElement) :
+ $element.bind($.support.transition.end, removeElement) :
removeElement()
}
@@ -88,10 +60,6 @@
$.fn.alert = function ( options ) {
- if ( options === true ) {
- return this.data('alert')
- }
-
return this.each(function () {
var $this = $(this)
, data
@@ -112,13 +80,11 @@
}
$.fn.alert.defaults = {
- selector: '.close'
+ selector: '[data-dismiss="alert"]'
}
- $(document).ready(function () {
- new Alert($('body'), {
- selector: '.alert-message[data-alert] .close'
- })
+ $(function () {
+ new Alert( $('body') )
})
}( window.jQuery || window.ender ); \ No newline at end of file
diff --git a/js/bootstrap-dropdown.js b/js/bootstrap-dropdown.js
index cab0ec27ed..bb7d11b1fa 100644
--- a/js/bootstrap-dropdown.js
+++ b/js/bootstrap-dropdown.js
@@ -1,5 +1,5 @@
/* ============================================================
- * bootstrap-dropdown.js v1.4.0
+ * bootstrap-dropdown.js v2.0.0
* http://twitter.github.com/bootstrap/javascript.html#dropdown
* ============================================================
* Copyright 2011 Twitter, Inc.
@@ -22,34 +22,45 @@
"use strict"
+ /* SIMPLE DROPDOWN LOGIC
+ * ===================== */
+
+ var s = '[data-toggle="dropdown"]'
+
+ function clearMenus() {
+ $(s).parent('li').removeClass('open')
+ }
+
+ function toggle(e) {
+ var li = $(this).parent('li')
+ , isActive = li.hasClass('open')
+
+ clearMenus()
+ !isActive && li.toggleClass('open')
+
+ return false
+ }
+
+
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
$.fn.dropdown = function ( selector ) {
return this.each(function () {
- $(this).delegate(selector || d, 'click', function (e) {
- var li = $(this).parent('li')
- , isActive = li.hasClass('open')
-
- clearMenus()
- !isActive && li.toggleClass('open')
- return false
- })
+ var args = ['click', toggle]
+ , $this = $(this)
+ selector && args.unshift(selector)
+ $this[selector ? 'delegate' : 'bind'].apply($this, args)
})
}
+
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
- var d = 'a.menu, .dropdown-toggle'
-
- function clearMenus() {
- $(d).parent('li').removeClass('open')
- }
-
$(function () {
$('html').bind("click", clearMenus)
- $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
+ $('body').dropdown(s)
})
}( window.jQuery || window.ender ); \ No newline at end of file
diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js
index be2315afba..ccc7b133b2 100644
--- a/js/bootstrap-modal.js
+++ b/js/bootstrap-modal.js
@@ -22,35 +22,6 @@
"use strict"
- /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
- * ======================================================= */
-
- var transitionEnd
-
- $(document).ready(function () {
-
- $.support.transition = (function () {
- var thisBody = document.body || document.documentElement
- , thisStyle = thisBody.style
- , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
- return support
- })()
-
- // set CSS transition event type
- if ( $.support.transition ) {
- transitionEnd = "TransitionEnd"
- if ( $.browser.webkit ) {
- transitionEnd = "webkitTransitionEnd"
- } else if ( $.browser.mozilla ) {
- transitionEnd = "transitionend"
- } else if ( $.browser.opera ) {
- transitionEnd = "oTransitionEnd"
- }
- }
-
- })
-
-
/* MODAL PUBLIC CLASS DEFINITION
* ============================= */
@@ -92,7 +63,7 @@
that.$element.addClass('in')
transition ?
- that.$element.one(transitionEnd, function () { that.$element.trigger('shown') }) :
+ that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
that.$element.trigger('shown')
})
@@ -130,14 +101,13 @@
* ===================== */
function hideWithTransition() {
- // firefox drops transitionEnd events :{o
var that = this
, timeout = setTimeout(function () {
- that.$element.unbind(transitionEnd)
+ that.$element.unbind($.support.transition.end)
hideModal.call(that)
}, 500)
- this.$element.one(transitionEnd, function () {
+ this.$element.one($.support.transition.end, function () {
clearTimeout(timeout)
hideModal.call(that)
})
@@ -171,14 +141,14 @@
this.$backdrop.addClass('in')
doAnimate ?
- this.$backdrop.one(transitionEnd, callback) :
+ this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if ( !this.isShown && this.$backdrop ) {
this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')?
- this.$backdrop.one(transitionEnd, $.proxy(removeBackdrop, this)) :
+ this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
removeBackdrop.call(this)
} else if ( callback ) {
@@ -240,9 +210,9 @@
$.fn.modal.Modal = Modal
$.fn.modal.defaults = {
- backdrop: false
- , keyboard: false
- , show: false
+ backdrop: true
+ , keyboard: true
+ , show: true
}
@@ -252,7 +222,7 @@
$(document).ready(function () {
$('body').delegate('[data-controls-modal]', 'click', function (e) {
e.preventDefault()
- var $this = $(this).data('show', true)
+ var $this = $(this)
$('#' + $this.attr('data-controls-modal')).modal( $this.data() )
})
})
diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js
index c23741735b..d0bd831317 100644
--- a/js/bootstrap-popover.js
+++ b/js/bootstrap-popover.js
@@ -1,5 +1,5 @@
/* ===========================================================
- * bootstrap-popover.js v1.4.0
+ * bootstrap-popover.js v2.0.0
* http://twitter.github.com/bootstrap/javascript.html#popover
* ===========================================================
* Copyright 2011 Twitter, Inc.
@@ -36,8 +36,8 @@
setContent: function () {
var $tip = this.tip()
- $tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
- $tip.find('.content > *')[this.options.html ? 'html' : 'text'](this.getContent())
+ $tip.find('.title')['html'](this.getTitle())
+ $tip.find('.content > *')['html'](this.getContent())
$tip[0].className = 'popover'
}
diff --git a/js/bootstrap-scrollspy.js b/js/bootstrap-scrollspy.js
index 1269d91ecb..91c2dcb1ed 100644
--- a/js/bootstrap-scrollspy.js
+++ b/js/bootstrap-scrollspy.js
@@ -20,33 +20,34 @@
!function ( $ ) {
- var $window = $(window)
-
function ScrollSpy() {
var process = $.proxy(this.process, this)
- this.$topbar = $('body')
- this.selector = '[data-scrollspy] li > a'
+ this.selector = '.nav li > a'
+
+ this.$body = $('body').delegate(this.selector, 'click', process)
+ this.$scrollElement = $('[data-spy="scroll"]').bind('scroll', process)
+
this.refresh()
- this.$topbar.delegate(this.selector, 'click', process)
- $window.scroll(process)
this.process()
}
ScrollSpy.prototype = {
refresh: function () {
- this.targets = this.$topbar.find(this.selector).map(function () {
- var href = $(this).attr('href')
- return /^#\w/.test(href) && $(href).length ? href : null
- })
+ this.targets = this.$body
+ .find(this.selector)
+ .map(function () {
+ var href = $(this).attr('href')
+ return /^#\w/.test(href) && $(href).length ? href : null
+ })
this.offsets = $.map(this.targets, function (id) {
- return $(id).offset().top
+ return $(id).position().top
})
}
, process: function () {
- var scrollTop = $window.scrollTop() + 10
+ var scrollTop = this.$scrollElement.scrollTop() + 10
, offsets = this.offsets
, targets = this.targets
, activeTarget = this.activeTarget
@@ -65,11 +66,11 @@
this.activeTarget = target
- this.$topbar
+ this.$body
.find(this.selector).parent('.active')
.removeClass('active')
- active = this.$topbar
+ active = this.$body
.find(this.selector + '[href="' + target + '"]')
.parent('li')
.addClass('active')
@@ -82,8 +83,6 @@
}
- $(function () {
- new ScrollSpy()
- })
+ $(function () { new ScrollSpy() })
}( window.jQuery || window.ender ) \ No newline at end of file
diff --git a/js/bootstrap-tabs.js b/js/bootstrap-tabs.js
index 790180ca2e..35418fd447 100644
--- a/js/bootstrap-tabs.js
+++ b/js/bootstrap-tabs.js
@@ -1,5 +1,5 @@
/* ========================================================
- * bootstrap-tabs.js v1.4.0
+ * bootstrap-tabs.js v2.0.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2011 Twitter, Inc.
diff --git a/js/bootstrap-transitions.js b/js/bootstrap-transitions.js
index 49b5338a8f..25f8b111f1 100644
--- a/js/bootstrap-transitions.js
+++ b/js/bootstrap-transitions.js
@@ -38,7 +38,7 @@ $(function () {
transitionEnd = "oTransitionEnd"
}
return transitionEnd
- })()
+ }())
}
})()
diff --git a/js/bootstrap-twipsy.js b/js/bootstrap-twipsy.js
index fc22d0218b..19e43a7234 100644
--- a/js/bootstrap-twipsy.js
+++ b/js/bootstrap-twipsy.js
@@ -1,5 +1,5 @@
/* ==========================================================
- * bootstrap-twipsy.js v1.4.0
+ * bootstrap-twipsy.js v2.0.0
* http://twitter.github.com/bootstrap/javascript.html#twipsy
* Adapted from the original jQuery.tipsy by Jason Frame
* ==========================================================
@@ -18,40 +18,10 @@
* limitations under the License.
* ========================================================== */
-
!function( $ ) {
"use strict"
- /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
- * ======================================================= */
-
- var transitionEnd
-
- $(document).ready(function () {
-
- $.support.transition = (function () {
- var thisBody = document.body || document.documentElement
- , thisStyle = thisBody.style
- , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
- return support
- })()
-
- // set CSS transition event type
- if ( $.support.transition ) {
- transitionEnd = "TransitionEnd"
- if ( $.browser.webkit ) {
- transitionEnd = "webkitTransitionEnd"
- } else if ( $.browser.mozilla ) {
- transitionEnd = "transitionend"
- } else if ( $.browser.opera ) {
- transitionEnd = "oTransitionEnd"
- }
- }
-
- })
-
-
/* TWIPSY PUBLIC CLASS DEFINITION
* ============================== */
@@ -119,7 +89,7 @@
, setContent: function () {
var $tip = this.tip()
- $tip.find('.twipsy-inner')[this.options.html ? 'html' : 'text'](this.getTitle())
+ $tip.find('.twipsy-inner').html(this.getTitle())
$tip[0].className = 'twipsy'
}
@@ -134,7 +104,7 @@
}
$.support.transition && this.$tip.hasClass('fade') ?
- $tip.bind(transitionEnd, removeElement) :
+ $tip.bind( $.support.transition.end, removeElement) :
removeElement()
}
@@ -164,7 +134,7 @@
title = ('' + title).replace(/(^\s*|\s*$)/, "")
- return title || o.fallback
+ return title
}
, tip: function() {
@@ -219,18 +189,21 @@
, eventIn
, eventOut
- if (options === true) {
- return this.data(name)
- } else if (typeof options == 'string') {
+ if (typeof options == 'string') {
twipsy = this.data(name)
- if (twipsy) {
- twipsy[options]()
- }
+ if (twipsy) twipsy[options]()
return this
}
options = $.extend({}, $.fn[name].defaults, options)
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay
+ , hide: options.delay
+ }
+ }
+
function get(ele) {
var twipsy = $.data(ele, name)
@@ -246,7 +219,7 @@
var twipsy = get(this)
twipsy.hoverState = 'in'
- if (options.delayIn == 0) {
+ if (!options.delay || !options.delay.show) {
twipsy.show()
} else {
twipsy.fixTitle()
@@ -254,21 +227,21 @@
if (twipsy.hoverState == 'in') {
twipsy.show()
}
- }, options.delayIn)
+ }, options.delay.show)
}
}
function leave() {
var twipsy = get(this)
twipsy.hoverState = 'out'
- if (options.delayOut == 0) {
+ if (!options.delay || !options.delay.hide) {
twipsy.hide()
} else {
setTimeout(function() {
if (twipsy.hoverState == 'out') {
twipsy.hide()
}
- }, options.delayOut)
+ }, options.delay.hide)
}
}
@@ -292,15 +265,12 @@
$.fn.twipsy.defaults = {
animate: true
- , delayIn: 0
- , delayOut: 0
- , fallback: ''
+ , delay: 0
, placement: 'above'
- , html: false
, live: false
, offset: 0
- , title: 'title'
, trigger: 'hover'
+ , title: 'title'
, template: '<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>'
}
diff --git a/lib/twipsy.less b/lib/twipsy.less
index 4193eda5fb..3fa21fa012 100644
--- a/lib/twipsy.less
+++ b/lib/twipsy.less
@@ -8,8 +8,8 @@
visibility: visible;
padding: 5px;
font-size: 11px;
- .opacity(80);
- &.fade.in {
+ .opacity(0);
+ &.in {
.opacity(80);
}
&.above .twipsy-arrow { #popoverArrow > .above(); }