javascript.html 56.8 KB
Newer Older
1001
1002
1003
1004
                  </p>
                </dd>
              </dl>
            </div>
1005
1006
1007
1008
        </div>
      </div>
    </section>

1009
1010
1011
1012
1013
1014
1015
1016
1017
     <!-- Carousel
    ================================================== -->

    <section id="carousel">
      <div class="page-header">
        <h1>Carousel <small>bootstrap-carousel.js</small></h1>
      </div>
      <div class="row">
        <div class="span3 columns">
1018
          <p>A generic plugin for cycling through elements. A merry-go-round.</p>
1019
1020
1021
1022
1023
1024
1025
          <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>
            <h3>Markup</h3>
          <p>Data attributes are integral to the carousel plugin. Check out the example code below for the various markup types.</p>
1026
1027
1028
1029
<pre class="prettyprint linenums">
&lt;div class="thumbnail carousel"&gt;

  &lt;!-- items --&gt;
Jacob Thornton's avatar
Jacob Thornton committed
1030
1031
1032
1033
1034
1035
1036
  &lt;div class="carousel-inner"&gt;
    &lt;div class="item active"&gt;
      &lt;img src="http://placehold.it/1100x350"&gt;
      &lt;div class="caption"&gt;
        &lt;h5&gt;Thumbnail label&lt;/h5&gt;
        &lt;p&gt;Cras justo odio, dapibus ac facilisis in, egestas eget quam. &lt;/p&gt;
      &lt;/div&gt;
1037
1038
    &lt;/div&gt;

Jacob Thornton's avatar
Jacob Thornton committed
1039
1040
1041
1042
1043
1044
    &lt;div class="item"&gt;
      &lt;img src="http://placehold.it/1100x350"&gt;
      &lt;div class="caption"&gt;
        &lt;h5&gt;Thumbnail label&lt;/h5&gt;
        &lt;p&gt;Donec id elit non mi porta gravida at eget metus.&lt;/p&gt;
      &lt;/div&gt;
1045
1046
1047
    &lt;/div&gt;
  &lt;/div&gt;

Jacob Thornton's avatar
Jacob Thornton committed
1048
1049
1050
1051
  &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;

1052
1053
&lt;/div&gt;
</pre>
1054
1055
1056
          <h3>Demo</h3>

          <!-- carousel -->
1057

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

Jacob Thornton's avatar
Jacob Thornton committed
1060
1061
1062
1063
1064
1065
1066
            <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>
1067
1068
              </div>

Jacob Thornton's avatar
Jacob Thornton committed
1069
1070
1071
1072
1073
1074
              <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>
1075
1076
              </div>

Jacob Thornton's avatar
Jacob Thornton committed
1077
1078
1079
1080
1081
1082
              <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>
1083
1084
1085
              </div>
            </div>

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

1089
1090
1091
1092
1093
1094
          </div>

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

1095
1096
      <!-- Footer
      ================================================== -->
1097
      <footer class="footer">
Mark Otto's avatar
Mark Otto committed
1098
        <p class="pull-right"><a href="#">Back to top</a></p>
Mark Otto's avatar
Mark Otto committed
1099
1100
1101
        <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>
1102
1103
      </footer>
    </div><!-- /container -->
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120


    <!-- 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>
1121
    <script src="../js/bootstrap-carousel.js"></script>
1122
1123
1124
1125
1126
1127
1128
1129
    <script src="assets/js/application.js"></script>
    <script>
      $(function () {
        // twipsy demo
        $('.twipsy-demo.well').twipsy({
          selector: "a[rel=twipsy]"
        })

1130
        // popover demo
1131
1132
1133
1134
1135
1136
        $("a[rel=popover]")
          .popover()
          .click(function(e) {
            e.preventDefault()
          })

1137
        // button state demo
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
        $('#fat-btn')
          .click(function () {
            var btn = $(this)
            btn.button('loading')
            setTimeout(function () {
              btn.button('reset')
            }, 3000)
          })
      })
    </script>
Jacob Thornton's avatar
Jacob Thornton committed
1148
  </body>
Mark Otto's avatar
Mark Otto committed
1149
</html>
For faster browsing, not all history is shown. View entire blame