javascript.html 61.1 KB
Newer Older
1001
                </dt>
1002
                <dd id="collapseThree" class="collapse">
1003
1004
1005
1006
1007
1008
                  <p>
                  Tempor gentrify pariatur nihil salvia, irony synth incididunt odio commodo brunch aute. Four loko est vice echo park wes anderson jean shorts, tempor ea vero locavore. Seitan DIY dolore readymade williamsburg viral. Dolor fap master cleanse delectus, ad butcher labore duis vice mollit cillum exercitation eu banh mi. Austin banksy 3 wolf moon locavore sed, helvetica next level VHS you probably haven't heard of them ethical odio. Incididunt locavore minim, do seitan consequat qui thundercats labore before they sold out retro laborum. Esse twee readymade laboris fap vice, voluptate DIY.
                  </p>
                </dd>
              </dl>
            </div>
1009
1010
1011
1012
        </div>
      </div>
    </section>

1013
1014
1015
1016
1017
1018
1019
1020
1021
     <!-- Carousel
    ================================================== -->

    <section id="carousel">
      <div class="page-header">
        <h1>Carousel <small>bootstrap-carousel.js</small></h1>
      </div>
      <div class="row">
        <div class="span3 columns">
1022
          <p>A generic plugin for cycling through elements. A merry-go-round.</p>
1023
1024
1025
1026
1027
          <a href="../js/bootstrap-carousel.js" target="_blank" class="btn primary">Download</a>
        </div>
        <div class="span9 columns">
          <h3>Using bootstrap-carousel.js</h3>
          <pre class="prettyprint linenums">$('.carousel').carousel()</pre>
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
          <h3>Options</h3>
          <table class="bordered-table striped-table">
            <thead>
             <tr>
               <th style="width: 100px;">Name</th>
               <th style="width: 50px;">type</th>
               <th style="width: 50px;">default</th>
               <th>description</th>
             </tr>
            </thead>
            <tbody>
             <tr>
               <td>interval</td>
               <td>number</td>
               <td>5000</td>
               <td>The amount of type to delay between automatically cycling an item.</td>
             </tr>
            </tbody>
          </table>
          <h3>Markup</h3>
1048
          <p>Data attributes are integral to the carousel plugin. Check out the example code below for the various markup types.</p>
1049
1050
1051
1052
<pre class="prettyprint linenums">
&lt;div class="thumbnail carousel"&gt;

  &lt;!-- items --&gt;
1053
  &lt;div class="carousel-inner"&gt;&lt;/div&gt;
1054

Jacob Thornton's avatar
Jacob Thornton committed
1055
1056
1057
1058
  &lt;!-- navigation --&gt;
  &lt;a class="nav" href="#myCarousel" data-slide="next"&gt;&amp;lt;&lt;/a&gt;
  &lt;a class="nav" href="#myCarousel" data-slide="prev"&gt;&amp;gt;&lt;/a&gt;

1059
1060
&lt;/div&gt;
</pre>
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
          <h3>Methods</h3>
          <h4>.carousel(options)</h4>
          <p>Initializes the carousel with an optional options <code>object</code> and starts cycling through items.</p>
          <pre class="prettyprint linenums">
          $('.myCarousel').carousel({
            interval: 2000
          })</pre>
          <h4>.carousel('cycle')</h4>
          <p>Cycles through the carousel items from left to right.</p>
          <h4>.carousel('pause')</h4>
          <p>Stops the carousel from cycling through items.</p>
          <h4>.carousel('prev')</h4>
          <p>Cycles to the previous item.</p>
          <h4>.carousel('next')</h4>
          <p>Cycles to the next item.</p>
          <h3>Events</h3>
          <p>Bootstrap's modal class exposes a few events for hooking into modal functionality. </p>
          <table class="bordered-table striped-table">
            <thead>
             <tr>
               <th style="width: 150px;">Event</th>
               <th>Description</th>
             </tr>
            </thead>
            <tbody>
             <tr>
               <td>slide</td>
               <td>This event fires immediately when the <code>slide</code> instance method is invoked.</td>
             </tr>
             <tr>
               <td>slid</td>
               <td>This event is fired when the carousel has completed it's slide transition.</td>
             </tr>
             </tr>
            </tbody>
          </table>
1097
1098
1099
          <h3>Demo</h3>

          <!-- carousel -->
1100

Jacob Thornton's avatar
Jacob Thornton committed
1101
          <div id="myCarousel" class="thumbnail carousel slide">
1102

Jacob Thornton's avatar
Jacob Thornton committed
1103
1104
1105
1106
1107
1108
1109
            <div class="carousel-inner">
              <div class="item active">
                <img src="http://placehold.it/1100x400" alt="">
                <div class="caption">
                  <h5>First Thumbnail label</h5>
                  <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
                </div>
1110
1111
              </div>

Jacob Thornton's avatar
Jacob Thornton committed
1112
1113
1114
1115
1116
1117
              <div class="item">
                <img src="http://placehold.it/1100x400" alt="">
                <div class="caption">
                  <h5>Second Thumbnail label</h5>
                  <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
                </div>
1118
1119
              </div>

Jacob Thornton's avatar
Jacob Thornton committed
1120
1121
1122
1123
1124
1125
              <div class="item">
                <img src="http://placehold.it/1100x400" alt="">
                <div class="caption">
                  <h5>Third Thumbnail label</h5>
                  <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
                </div>
1126
1127
1128
              </div>
            </div>

Jacob Thornton's avatar
Jacob Thornton committed
1129
1130
1131
            <a class="left nav" href="#myCarousel" data-slide="prev">&laquo;</a>
            <a class="right nav" href="#myCarousel" data-slide="next">&raquo;</a>

1132
1133
1134
1135
1136
1137
          </div>

        </div>
      </div>
    </section>

1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
 <!-- Typeahead
    ================================================== -->

    <section id="typeahead">
      <div class="page-header">
        <h1>Typeahead <small>bootstrap-typeahead.js</small></h1>
      </div>
      <div class="row">
        <div class="span3 columns">
          <p>A basic, easily extended plugin for quickly creating elegant typeaheads.</p>
1148
          <a href="../js/bootstrap-typeahead.js" target="_blank" class="btn primary">Download</a>
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
        </div>
        <div class="span9 columns">
          <h3>Using bootstrap-typeahead.js</h3>
          <pre class="prettyprint linenums">$('.typeahead').typeahead()</pre>

          <h3>Options</h3>
          <table class="bordered-table striped-table">
            <thead>
             <tr>
               <th style="width: 100px;">Name</th>
               <th style="width: 50px;">type</th>
               <th style="width: 50px;">default</th>
               <th>description</th>
             </tr>
            </thead>
            <tbody>
             <tr>
               <td>items</td>
               <td>number</td>
               <td>8</td>
               <td>The max number of items to display in the dropdown.</td>
             </tr>
            </tbody>
          </table>

          <h3>Markup</h3>
          <p>Add data attributes to register an element with typeahead functionality.</p>
<pre class="prettyprint linenums">
1177
&lt;input type="text" data-provide="typeahead"&gt;
1178
1179
1180
1181
1182
1183
1184
1185
</pre>
          <h3>Demo</h3>
          <input type="text" data-provide="typeahead" data-items="4" data-data='["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Dakota","North Carolina","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"]'>
        </div>
      </div>
    </section>


1186
1187
      <!-- Footer
      ================================================== -->
1188
      <footer class="footer">
Mark Otto's avatar
Mark Otto committed
1189
        <p class="pull-right"><a href="#">Back to top</a></p>
Mark Otto's avatar
Mark Otto committed
1190
1191
1192
        <p>Designed and built with all the love in the world <a href="http://twitter.com/twitter" target="_blank">@twitter</a> by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p>
        <p>Code licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>. Documentation licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
        <p>Icons from <a href="http://glyphicons.com">Glyphicons Free</a>, licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p>
1193
1194
      </footer>
    </div><!-- /container -->
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211


    <!-- Le javascript -->
    <!-- Placed at the end of the document so the pages load faster -->
    <!-- <script src="http://code.jquery.com/jquery-1.7.min.js"></script> -->
    <script src="../js/tests/vendor/jquery.js"></script>
    <script src="assets/js/google-code-prettify/prettify.js"></script>
    <script src="../js/bootstrap-transition.js"></script>
    <script src="../js/bootstrap-alert.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-tab.js"></script>
    <script src="../js/bootstrap-twipsy.js"></script>
    <script src="../js/bootstrap-popover.js"></script>
    <script src="../js/bootstrap-button.js"></script>
    <script src="../js/bootstrap-collapse.js"></script>
1212
    <script src="../js/bootstrap-carousel.js"></script>
1213
    <script src="../js/bootstrap-typeahead.js"></script>
1214
1215
1216
1217
1218
1219
1220
    <script src="assets/js/application.js"></script>
    <script>
      $(function () {
        // twipsy demo
        $('.twipsy-demo.well').twipsy({
          selector: "a[rel=twipsy]"
        })
1221
        $('.twipsy-test').twipsy()
1222

1223
        // popover demo
1224
1225
1226
1227
1228
1229
        $("a[rel=popover]")
          .popover()
          .click(function(e) {
            e.preventDefault()
          })

1230
        // button state demo
1231
1232
1233
1234
1235
1236
1237
1238
        $('#fat-btn')
          .click(function () {
            var btn = $(this)
            btn.button('loading')
            setTimeout(function () {
              btn.button('reset')
            }, 3000)
          })
1239
1240
1241

        // carousel demo
        $('#myCarousel').carousel()
1242
1243
      })
    </script>
Jacob Thornton's avatar
Jacob Thornton committed
1244
  </body>
Mark Otto's avatar
Mark Otto committed
1245
</html>
For faster browsing, not all history is shown. View entire blame