docs.html 254 KB
Newer Older
4001
4002
4003
4004
4005
4006
4007
      <img data-src="holder.js/260x180" alt="">
    </a>
  </div>
  ...
</div>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4008
4009
4010
4011
    <h3>Custom content thumbnails</h3>
    <p>With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.</p>
    <div class="bs-docs-example">
      <div class="row">
Mark Otto's avatar
Mark Otto committed
4012
        <div class="col-span-4">
Mark Otto's avatar
Mark Otto committed
4013
4014
4015
4016
4017
4018
4019
4020
4021
          <div class="thumbnail">
            <img data-src="holder.js/300x200" alt="">
            <div class="caption">
              <h3>Thumbnail label</h3>
              <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>
              <p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn">Action</a></p>
            </div>
          </div>
        </div>
Mark Otto's avatar
Mark Otto committed
4022
        <div class="col-span-4">
Mark Otto's avatar
Mark Otto committed
4023
4024
4025
4026
4027
4028
4029
4030
4031
          <div class="thumbnail">
            <img data-src="holder.js/300x200" alt="">
            <div class="caption">
              <h3>Thumbnail label</h3>
              <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>
              <p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn">Action</a></p>
            </div>
          </div>
        </div>
Mark Otto's avatar
Mark Otto committed
4032
        <div class="col-span-4">
Mark Otto's avatar
Mark Otto committed
4033
4034
4035
4036
4037
4038
          <div class="thumbnail">
            <img data-src="holder.js/300x200" alt="">
            <div class="caption">
              <h3>Thumbnail label</h3>
              <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>
              <p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn">Action</a></p>
4039
            </div>
Mark Otto's avatar
Mark Otto committed
4040
4041
4042
4043
          </div>
        </div>
      </div>
    </div><!-- /.bs-docs-example -->
4044
4045
{% highlight html linenos %}
<div class="row">
Mark Otto's avatar
Mark Otto committed
4046
  <div class="col-span-3">
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
    <div class="thumbnail">
      <img data-src="holder.js/300x200" alt="">
      <div class="caption">
        <h3>Thumbnail label</h3>
        <p>...</p>
        <p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn">Action</a></p>
      </div>
    </div>
  </div>
</div>
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4058
  </div>
4059
4060
4061
4062




Mark Otto's avatar
Mark Otto committed
4063
4064
4065
4066
4067
4068
4069
  <!-- Alerts
  ================================================== -->
  <div class="bs-docs-section" id="alerts">
    <div class="page-header">
      <h1>Alerts</h1>
    </div>
    <p class="lead">Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. For inline dismissal, use the <a href="./javascript.html#alerts">alerts jQuery plugin</a>.</p>
4070

Mark Otto's avatar
Mark Otto committed
4071
4072
4073
4074
4075
4076
4077
4078
    <h3 id="alerts-default">Default alert</h3>
    <p>Wrap any text and an optional dismiss button in <code>.alert</code> for a basic warning alert message. <strong>To ensure proper behavior across all devices</strong>, be sure to use <code>&lt;button&gt;</code> element with the <code>data-dismiss="alert"</code> data attribute.</p>
    <div class="bs-docs-example">
      <div class="alert">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <strong>Warning!</strong> Best check yo self, you're not looking too good.
      </div>
    </div>
4079
4080
4081
4082
4083
4084
4085
{% highlight html linenos %}
<div class="alert">
  <button type="button" class="close" data-dismiss="alert">&times;</button>
  <strong>Warning!</strong> Best check yo self, you're not looking too good.
</div>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4086
4087
4088
4089
4090
4091
4092
4093
4094
    <h3 id="alerts-block">Block alerts</h3>
    <p>For longer messages, increase the padding on the top and bottom of the alert wrapper by adding <code>.alert-block</code>.</p>
    <div class="bs-docs-example">
      <div class="alert alert-block">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <h4>Warning!</h4>
        <p>Best check yo self, you're not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.</p>
      </div>
    </div>
4095
4096
4097
4098
4099
4100
4101
4102
{% highlight html linenos %}
<div class="alert alert-block">
  <button type="button" class="close" data-dismiss="alert">&times;</button>
  <h4>Warning!</h4>
  <p>...</p>
</div>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
    <h3 id="alerts-alternatives">Contextual alternatives</h3>
    <p>Add optional classes to change an alert's connotation.</p>
    <div class="bs-docs-example">
      <div class="alert alert-error">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <strong>Oh snap!</strong> Change a few things up and try submitting again.
      </div>
      <div class="alert alert-success">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <strong>Well done!</strong> You successfully read this important alert message.
      </div>
      <div class="alert alert-info">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <strong>Heads up!</strong> This alert needs your attention, but it's not super important.
      </div>
    </div>
4119
4120
4121
4122
4123
{% highlight html linenos %}
<div class="alert alert-error">...</div>
<div class="alert alert-success">...</div>
<div class="alert alert-info">...</div>
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4124
  </div>
4125
4126
4127
4128




Mark Otto's avatar
Mark Otto committed
4129
4130
4131
4132
4133
4134
4135
  <!-- Progress bars
  ================================================== -->
  <div class="bs-docs-section" id="progress">
    <div class="page-header">
      <h1>Progress bars</h1>
    </div>
    <p class="lead">Provide up-to-date feedback on the progress of a workflow or action with simple yet flexible progress bars.</p>
4136

Mark Otto's avatar
Mark Otto committed
4137
    <p>Progress bars use CSS3 transitions and animations to achieve some of their effects. These features are not supported in IE8-9 or older versions of Firefox. Internet Explorer 10 and below, as well as Opera 12, do not support animations.</p>
4138

Mark Otto's avatar
Mark Otto committed
4139
4140
4141
4142
4143
4144
4145
    <h3 id="progress-basic">Basic</h3>
    <p>Default progress bar with a vertical gradient.</p>
    <div class="bs-docs-example">
      <div class="progress">
        <div class="progress-bar" style="width: 60%;"></div>
      </div>
    </div>
4146
4147
4148
4149
4150
4151
{% highlight html linenos %}
<div class="progress">
  <div class="progress-bar" style="width: 60%;"></div>
</div>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
    <h3 id="progress-alternatives">Contextual alternatives</h3>
    <p>Progress bars use some of the same button and alert classes for consistent styles.</p>
    <div class="bs-docs-example">
      <div class="progress" style="margin-bottom: 9px;">
        <div class="progress-bar progress-bar-info" style="width: 20%"></div>
      </div>
      <div class="progress" style="margin-bottom: 9px;">
        <div class="progress-bar progress-bar-success" style="width: 40%"></div>
      </div>
      <div class="progress" style="margin-bottom: 9px;">
        <div class="progress-bar progress-bar-warning" style="width: 60%"></div>
      </div>
      <div class="progress">
        <div class="progress-bar progress-bar-danger" style="width: 80%"></div>
      </div>
    </div>
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
{% highlight html linenos %}
<div class="progress">
  <div class="progress-bar progress-bar-info" style="width: 20%"></div>
</div>
<div class="progress">
  <div class="progress-bar progress-bar-success" style="width: 40%"></div>
</div>
<div class="progress">
  <div class="progress-bar progress-bar-warning" style="width: 60%"></div>
</div>
<div class="progress">
  <div class="progress-bar progress-bar-danger" style="width: 80%"></div>
</div>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
    <h3 id="progress-striped">Striped</h3>
    <p>Uses a gradient to create a striped effect. Not available in IE8.</p>
    <div class="bs-docs-example">
      <div class="progress progress-striped" style="margin-bottom: 9px;">
        <div class="progress-bar progress-bar-info" style="width: 20%"></div>
      </div>
      <div class="progress progress-striped" style="margin-bottom: 9px;">
        <div class="progress-bar progress-bar-success" style="width: 40%"></div>
      </div>
      <div class="progress progress-striped" style="margin-bottom: 9px;">
        <div class="progress-bar progress-bar-warning" style="width: 60%"></div>
      </div>
      <div class="progress progress-striped">
        <div class="progress-bar progress-bar-danger" style="width: 80%"></div>
      </div>
    </div>
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
{% highlight html linenos %}
<div class="progress progress-striped">
  <div class="progress-bar progress-bar-info" style="width: 20%"></div>
</div>
<div class="progress progress-striped">
  <div class="progress-bar progress-bar-success" style="width: 40%"></div>
</div>
<div class="progress progress-striped">
  <div class="progress-bar progress-bar-warning" style="width: 60%"></div>
</div>
<div class="progress progress-striped">
  <div class="progress-bar progress-bar-danger" style="width: 80%"></div>
</div>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4214
4215
4216
4217
4218
4219
4220
    <h3 id="progress-animated">Animated</h3>
    <p>Add <code>.active</code> to <code>.progress-striped</code> to animate the stripes right to left. Not available in all versions of IE.</p>
    <div class="bs-docs-example">
      <div class="progress progress-striped active">
        <div class="progress-bar" style="width: 45%"></div>
      </div>
    </div>
4221
4222
4223
4224
4225
4226
{% highlight html linenos %}
<div class="progress progress-striped active">
  <div class="progress-bar" style="width: 45%"></div>
</div>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4227
4228
4229
4230
4231
4232
4233
4234
4235
    <h3 id="progress-stacked">Stacked</h3>
    <p>Place multiple bars into the same <code>.progress</code> to stack them.</p>
    <div class="bs-docs-example">
      <div class="progress">
        <div class="progress-bar progress-bar-success" style="width: 35%"></div>
        <div class="progress-bar progress-bar-warning" style="width: 20%"></div>
        <div class="progress-bar progress-bar-danger" style="width: 10%"></div>
      </div>
    </div>
4236
4237
4238
4239
4240
4241
4242
{% highlight html linenos %}
<div class="progress">
  <div class="progress-bar progress-bar-success" style="width: 35%"></div>
  <div class="progress-bar progress-bar-warning" style="width: 20%"></div>
  <div class="progress-bar progress-bar-danger" style="width: 10%"></div>
</div>
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4243
  </div>
4244
4245
4246
4247




Mark Otto's avatar
Mark Otto committed
4248
4249
4250
4251
4252
4253
4254
  <!-- Media object
  ================================================== -->
  <div class="bs-docs-section" id="media">
    <div class="page-header">
      <h1>Media object</h1>
    </div>
    <p class="lead">Abstract object styles for building various types of components (like blog comments, Tweets, etc) that feature a left- or right-aligned image alongside textual content.</p>
4255

Mark Otto's avatar
Mark Otto committed
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
    <h3>Default example</h3>
    <p>The default media allow to float a media object (images, video, audio) to the left or right of a content block.</p>
    <div class="bs-docs-example">
      <div class="media">
        <a class="pull-left" href="#">
          <img class="media-object" data-src="holder.js/64x64">
        </a>
        <div class="media-body">
          <h4 class="media-heading">Media heading</h4>
          Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
        </div>
      </div>
      <div class="media">
        <a class="pull-left" href="#">
          <img class="media-object" data-src="holder.js/64x64">
        </a>
        <div class="media-body">
          <h4 class="media-heading">Media heading</h4>
          Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
          <div class="media">
            <a class="pull-left" href="#">
              <img class="media-object" data-src="holder.js/64x64">
            </a>
            <div class="media-body">
              <h4 class="media-heading">Media heading</h4>
              Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
            </div>
4283
          </div>
Mark Otto's avatar
Mark Otto committed
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
        </div>
      </div>
    </div><!-- /.bs-docs-example -->
{% highlight html linenos %}
<div class="media">
  <a class="pull-left" href="#">
    <img class="media-object" src="...">
  </a>
  <div class="media-body">
    <h4 class="media-heading">Media heading</h4>
    ...
  </div>
</div>
{% endhighlight %}
4298

Mark Otto's avatar
Mark Otto committed
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
    <h3>Media list</h3>
    <p>With a bit of extra markup, you can use media inside list (useful for comment threads or articles lists).</p>
    <div class="bs-docs-example">
      <ul class="media-list">
        <li class="media">
          <a class="pull-left" href="#">
            <img class="media-object" data-src="holder.js/64x64">
          </a>
          <div class="media-body">
            <h4 class="media-heading">Media heading</h4>
            <p>Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.</p>
            <!-- Nested media object -->
4311
4312
4313
4314
4315
            <div class="media">
              <a class="pull-left" href="#">
                <img class="media-object" data-src="holder.js/64x64">
              </a>
              <div class="media-body">
Mark Otto's avatar
Mark Otto committed
4316
4317
4318
                <h4 class="media-heading">Nested media heading</h4>
                Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
                <!-- Nested media object -->
4319
4320
4321
4322
4323
                <div class="media">
                  <a class="pull-left" href="#">
                    <img class="media-object" data-src="holder.js/64x64">
                  </a>
                  <div class="media-body">
Mark Otto's avatar
Mark Otto committed
4324
4325
                    <h4 class="media-heading">Nested media heading</h4>
                    Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
4326
4327
4328
4329
                  </div>
                </div>
              </div>
            </div>
Mark Otto's avatar
Mark Otto committed
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
            <!-- Nested media object -->
            <div class="media">
              <a class="pull-left" href="#">
                <img class="media-object" data-src="holder.js/64x64">
              </a>
              <div class="media-body">
                <h4 class="media-heading">Nested media heading</h4>
                Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
              </div>
            </div>
          </div>
        </li>
        <li class="media">
          <a class="pull-right" href="#">
            <img class="media-object" data-src="holder.js/64x64">
          </a>
          <div class="media-body">
            <h4 class="media-heading">Media heading</h4>
            Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
4349
          </div>
Mark Otto's avatar
Mark Otto committed
4350
4351
4352
        </li>
      </ul>
    </div>
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
{% highlight html linenos %}
<ul class="media-list">
  <li class="media">
    <a class="pull-left" href="#">
      <img class="media-object" src="...">
    </a>
    <div class="media-body">
      <h4 class="media-heading">Media heading</h4>
      ...
    </div>
  </li>
</ul>
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4366
  </div>
4367
4368
4369
4370
4371





Mark Otto's avatar
Mark Otto committed
4372
4373
4374
4375
4376
4377
  <!-- Wells
  ================================================== -->
  <div class="bs-docs-section" id="wells">
    <div class="page-header">
      <h1>Wells</h1>
    </div>
4378

Mark Otto's avatar
Mark Otto committed
4379
4380
4381
4382
4383
4384
4385
    <h3>Default well</h3>
    <p>Use the well as a simple effect on an element to give it an inset effect.</p>
    <div class="bs-docs-example">
      <div class="well">
        Look, I'm in a well!
      </div>
    </div>
4386
4387
4388
{% highlight html linenos %}
<div class="well">...</div>
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4389
4390
4391
4392
4393
4394
4395
    <h3>Optional classes</h3>
    <p>Control padding and rounded corners with two optional modifier classes.</p>
    <div class="bs-docs-example">
      <div class="well well-large">
        Look, I'm in a well!
      </div>
    </div>
4396
4397
4398
4399
{% highlight html linenos %}
<div class="well well-large">...</div>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4400
4401
4402
4403
4404
    <div class="bs-docs-example">
      <div class="well well-small">
        Look, I'm in a well!
      </div>
    </div>
4405
4406
4407
{% highlight html linenos %}
<div class="well well-small">...</div>
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4408
  </div>
4409
4410
4411



4412
4413


Mark Otto's avatar
Mark Otto committed
4414
4415
4416
4417
  <div class="bs-docs-section-header" id="js">
    <h1>JavaScript plugins</h1>
    <p class="lead">Bring Bootstrap's components to life with over a dozen custom jQuery plugins. Easily include them all, or one by one.</p>
  </div>
4418

4419

Mark Otto's avatar
Mark Otto committed
4420
4421
4422
4423
4424
4425
  <!-- Overview
  ================================================== -->
  <div class="bs-docs-section" id="js-overview">
    <div class="page-header">
      <h1>Overview</h1>
    </div>
4426

Mark Otto's avatar
Mark Otto committed
4427
4428
    <h3 id="js-individual-compiled">Individual or compiled</h3>
    <p>Plugins can be included individually (though some have required dependencies), or all at once. <strong>Do attempt to include both.</strong> Both <strong>bootstrap.js</strong> and <strong>bootstrap.min.js</strong> contain all plugins in a single file.</p>
4429

Mark Otto's avatar
Mark Otto committed
4430
4431
    <h3 id="js-data-attrs">Data attributes</h3>
    <p>You can use all Bootstrap plugins purely through the markup API without writing a single line of JavaScript. This is Bootstrap's first class API and should be your first consideration when using a plugin.</p>
4432

Mark Otto's avatar
Mark Otto committed
4433
    <p>That said, in some situations it may be desirable to turn this functionality off. Therefore, we also provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
4434
4435
4436
4437
{% highlight js linenos %}
$('body').off('.data-api')
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4438
    <p>Alternatively, to target a specific plugin, just include the plugin's name as a namespace along with the data-api namespace like this:</p>
4439
4440
4441
4442
{% highlight js linenos %}
$('body').off('.alert.data-api')
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4443
4444
    <h3 id="js-programmatic-api">Programmatic API</h3>
    <p>We also believe you should be able to use all Bootstrap plugins purely through the JavaScript API. All public APIs are single, chainable methods, and return the collection acted upon.</p>
4445
4446
4447
4448
{% highlight js linenos %}
$(".btn.danger").button("toggle").addClass("fat")
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4449
    <p>All methods should accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior):</p>
4450
4451
4452
4453
4454
4455
{% highlight js linenos %}
$("#myModal").modal()                      // initialized with defaults
$("#myModal").modal({ keyboard: false })   // initialized with no keyboard
$("#myModal").modal('show')                // initializes and invokes show immediately</p>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4456
    <p>Each plugin also exposes its raw constructor on a `Constructor` property: <code>$.fn.popover.Constructor</code>. If you'd like to get a particular plugin instance, retrieve it directly from an element: <code>$('[rel=popover]').data('popover')</code>.</p>
4457

Mark Otto's avatar
Mark Otto committed
4458
4459
    <h3 id="js-noconflict">No conflict</h3>
    <p>Sometimes it is necessary to use Bootstrap plugins with other UI frameworks. In these circumstances, namespace collisions can occasionally occur. If this happens, you may call <code>.noConflict</code> on the plugin you wish to revert the value of.</p>
4460
4461
4462
4463
4464
{% highlight js linenos %}
var bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
$.fn.bootstrapBtn = bootstrapButton            // give $().bootstrapBtn the bootstrap functionality
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4465
4466
4467
    <h3 id="js-events">Events</h3>
    <p>Bootstrap provides custom events for most plugin's unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. <code>show</code>) is triggered at the start of an event, and its past participle form (ex. <code>shown</code>) is trigger on the completion of an action.</p>
    <p>All infinitive events provide <code>preventDefault</code> functionality. This provides the ability to stop the execution of an action before it starts.</p>
4468
4469
{% highlight js linenos %}
$('#myModal').on('show', function (e) {
Mark Otto's avatar
Mark Otto committed
4470
  if (!data) return e.preventDefault() // stops modal from being shown
4471
4472
})
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4473
  </div>
4474
4475
4476



Mark Otto's avatar
Mark Otto committed
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
  <!-- Transitions
  ================================================== -->
  <div class="bs-docs-section" id="transitions">
    <div class="page-header">
      <h1>Transitions <small>bootstrap-transition.js</small></h1>
    </div>
    <h3>About transitions</h3>
    <p>For simple transition effects, include bootstrap-transition.js once alongside the other JS files. If you're using the compiled (or minified) bootstrap.js, there is no need to include this&mdash;it's already there.</p>
    <h3>Use cases</h3>
    <p>A few examples of the transition plugin:</p>
    <ul>
      <li>Sliding or fading in modals</li>
      <li>Fading out tabs</li>
      <li>Fading out alerts</li>
      <li>Sliding carousel panes</li>
    </ul>
4493

Mark Otto's avatar
Mark Otto committed
4494
4495
    <!-- Ideas: include docs for .fade.in, .slide.in, etc -->
  </div>
4496
4497
4498



Mark Otto's avatar
Mark Otto committed
4499
4500
4501
4502
4503
4504
  <!-- Modal
  ================================================== -->
  <div class="bs-docs-section" id="modals">
    <div class="page-header">
      <h1>Modals <small>bootstrap-modal.js</small></h1>
    </div>
4505

Mark Otto's avatar
Mark Otto committed
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
    <h2 id="modals-examples">Examples</h2>
    <p>Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.</p>

    <h3>Static example</h3>
    <p>A rendered modal with header, body, and set of actions in the footer.</p>
    <div class="bs-docs-example bs-docs-example-modal">
      <div class="modal">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
              <h4 class="modal-title">Modal title</h4>
            </div>
            <div class="modal-body">
              <p>One fine body&hellip;</p>
            </div>
            <div class="modal-footer">
              <a href="#" class="btn">Close</a>
              <a href="#" class="btn btn-primary">Save changes</a>
            </div>
          </div><!-- /.modal-content -->
        </div><!-- /.modal-dalog -->
      </div><!-- /.modal -->
    </div><!-- /example -->
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
{% highlight html linenos %}
<div class="modal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Modal title</h4>
      </div>
      <div class="modal-body">
        <p>One fine body&hellip;</p>
      </div>
      <div class="modal-footer">
        <a href="#" class="btn">Close</a>
        <a href="#" class="btn btn-primary">Save changes</a>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dalog -->
</div><!-- /.modal -->
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4550
4551
4552
4553
4554
4555
    <h3>Live demo</h3>
    <p>Toggle a modal via JavaScript by clicking the button below. It will slide down and fade in from the top of the page.</p>
    <!-- sample modal content -->
    <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
4556

Mark Otto's avatar
Mark Otto committed
4557
4558
4559
4560
4561
4562
4563
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="myModalLabel">Modal Heading</h4>
          </div>
          <div class="modal-body">
            <h4>Text in a modal</h4>
            <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p>
4564

Mark Otto's avatar
Mark Otto committed
4565
4566
            <h4>Popover in a modal</h4>
            <p>This <a href="#" role="button" class="btn popover-test" title="A Title" data-content="And here's some amazing content. It's very engaging. right?">button</a> should trigger a popover on click.</p>
4567

Mark Otto's avatar
Mark Otto committed
4568
4569
            <h4>Tooltips in a modal</h4>
            <p><a href="#" class="tooltip-test" title="Tooltip">This link</a> and <a href="#" class="tooltip-test" title="Tooltip">that link</a> should have tooltips on hover.</p>
4570

Mark Otto's avatar
Mark Otto committed
4571
            <hr>
4572

Mark Otto's avatar
Mark Otto committed
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
            <h4>Overflowing text to show optional scrollbar</h4>
            <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
            <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
            <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
            <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p>
            <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
            <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p>
          </div>
          <div class="modal-footer">
            <button class="btn" data-dismiss="modal">Close</button>
            <button class="btn btn-primary">Save changes</button>
          </div>
4585

Mark Otto's avatar
Mark Otto committed
4586
4587
4588
        </div><!-- /.modal-content -->
      </div><!-- /.modal-dalog -->
    </div><!-- /.modal -->
4589

Mark Otto's avatar
Mark Otto committed
4590
4591
4592
    <div class="bs-docs-example" style="padding-bottom: 24px;">
      <a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a>
    </div><!-- /example -->
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
{% highlight html linenos %}
<div class="modal">
  <!-- Button trigger modal -->
  <a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">Launch demo modal</a>

  <!-- Modal -->
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <a href="#" class="btn">Close</a>
        <a href="#" class="btn btn-primary">Save changes</a>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dalog -->
</div><!-- /.modal -->
{% endhighlight %}



Mark Otto's avatar
Mark Otto committed
4619
    <h2 id="modals-usage">Usage</h2>
4620

Mark Otto's avatar
Mark Otto committed
4621
4622
    <h3>Via data attributes</h3>
    <p>Activate a modal without writing JavaScript. Set <code>data-toggle="modal"</code> on a controller element, like a button, along with a <code>data-target="#foo"</code> or <code>href="#foo"</code> to target a specific modal to toggle.</p>
4623
4624
4625
4626
{% highlight html linenos %}
<button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button>
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
    <h3>Via JavaScript</h3>
    <p>Call a modal with id <code>myModal</code> with a single line of JavaScript:</p>
    {% highlight js linenos %}$('#myModal').modal(options){% endhighlight %}

    <h3>Options</h3>
    <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-backdrop=""</code>.</p>
    <table class="table table-bordered table-striped">
      <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>backdrop</td>
         <td>boolean</td>
         <td>true</td>
         <td>Includes a modal-backdrop element. Alternatively, specify <code>static</code> for a backdrop which doesn't close the modal on click.</td>
       </tr>
       <tr>
         <td>keyboard</td>
         <td>boolean</td>
         <td>true</td>
         <td>Closes the modal when escape key is pressed</td>
       </tr>
       <tr>
         <td>show</td>
         <td>boolean</td>
         <td>true</td>
         <td>Shows the modal when initialized.</td>
       </tr>
       <tr>
         <td>remote</td>
         <td>path</td>
         <td>false</td>
         <td><p>If a remote url is provided, content will be loaded via jQuery's <code>load</code> method and injected into the <code>.modal-body</code>. If you're using the data api, you may alternatively use the <code>href</code> tag to specify the remote source. An example of this is shown below:</p>
4666
4667
4668
{% highlight html linenos %}
<a data-toggle="modal" href="remote.html" data-target="#modal">Click me</a>
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4669
4670
4671
       </tr>
      </tbody>
    </table>
4672

Mark Otto's avatar
Mark Otto committed
4673
    <h3>Methods</h3>
4674

Mark Otto's avatar
Mark Otto committed
4675
4676
    <h4>.modal(options)</h4>
    <p>Activates your content as a modal. Accepts an optional options <code>object</code>.</p>
4677
4678
4679
4680
4681
4682
{% highlight js linenos %}
$('#myModal').modal({
  keyboard: false
})
{% endhighlight %}

Mark Otto's avatar
Mark Otto committed
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
    <h4>.modal('toggle')</h4>
    <p>Manually toggles a modal.</p>
    {% highlight js linenos %}$('#myModal').modal('toggle'){% endhighlight %}

    <h4>.modal('show')</h4>
    <p>Manually opens a modal.</p>
    {% highlight js linenos %}$('#myModal').modal('show'){% endhighlight %}

    <h4>.modal('hide')</h4>
    <p>Manually hides a modal.</p>
    {% highlight js linenos %}$('#myModal').modal('hide'){% endhighlight %}

    <h3>Events</h3>
    <p>Bootstrap's modal class exposes a few events for hooking into modal functionality.</p>
    <table class="table table-bordered table-striped">
      <thead>
       <tr>
         <th style="width: 150px;">Event</th>
         <th>Description</th>
       </tr>
      </thead>
      <tbody>
       <tr>
         <td>show</td>
         <td>This event fires immediately when the <code>show</code> instance method is called.</td>
       </tr>
       <tr>
         <td>shown</td>
         <td>This event is fired when the modal has been made visible to the user (will wait for css transitions to complete).</td>
       </tr>
       <tr>
         <td>hide</td>
         <td>This event is fired immediately when the <code>hide</code> instance method has been called.</td>
       </tr>
       <tr>
         <td>hidden</td>
         <td>This event is fired when the modal has finished being hidden from the user (will wait for css transitions to complete).</td>
       </tr>
      </tbody>
    </table>
4723
4724
4725
4726
4727
{% highlight js linenos %}
$('#myModal').on('hidden', function () {
  // do something…
})
{% endhighlight %}
Mark Otto's avatar
Mark Otto committed
4728
  </div>
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000



        <!-- Dropdowns
        ================================================== -->
        <section id="dropdowns">
          <div class="page-header">
            <h1>Dropdowns <small>bootstrap-dropdown.js</small></h1>
          </div>


          <h2>Examples</h2>
          <p>Add dropdown menus to nearly anything with this simple plugin, including the navbar, tabs, and pills.</p>

          <h3>Within a navbar</h3>
          <div class="bs-docs-example">
            <div id="navbar-example" class="navbar navbar-static">
              <div class="navbar-inner">
                <div class="container" style="width: auto;">
                  <a class="navbar-brand" href="#">Project Name</a>
                  <ul class="nav" role="navigation">
                    <li class="dropdown">
                      <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
                      <ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="http://google.com">Action</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#anotherAction">Another action</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                        <li role="presentation" class="divider"></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                      </ul>
                    </li>
                    <li class="dropdown">
                      <a href="#" id="drop2" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 2 <b class="caret"></b></a>
                      <ul class="dropdown-menu" role="menu" aria-labelledby="drop2">
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                        <li role="presentation" class="divider"></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                      </ul>
                    </li>
                  </ul>
                  <ul class="nav pull-right">
                    <li id="fat-menu" class="dropdown">
                      <a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">Dropdown 3 <b class="caret"></b></a>
                      <ul class="dropdown-menu" role="menu" aria-labelledby="drop3">
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                        <li role="presentation" class="divider"></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                      </ul>
                    </li>
                  </ul>
                </div>
              </div>
            </div> <!-- /navbar-example -->
          </div> <!-- /example -->

          <h3>Within tabs</h3>
          <div class="bs-docs-example">
            <ul class="nav nav-pills">
              <li class="active"><a href="#">Regular link</a></li>
              <li class="dropdown">
                <a class="dropdown-toggle" id="drop4" role="button" data-toggle="dropdown" href="#">Dropdown <b class="caret"></b></a>
                <ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                  <li role="presentation" class="divider"></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                </ul>
              </li>
              <li class="dropdown">
                <a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 2 <b class="caret"></b></a>
                <ul id="menu2" class="dropdown-menu" role="menu" aria-labelledby="drop5">
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                  <li role="presentation" class="divider"></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                </ul>
              </li>
              <li class="dropdown">
                <a class="dropdown-toggle" id="drop5" role="button" data-toggle="dropdown" href="#">Dropdown 3 <b class="caret"></b></a>
                <ul id="menu3" class="dropdown-menu" role="menu" aria-labelledby="drop5">
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                  <li role="presentation" class="divider"></li>
                  <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                </ul>
              </li>
            </ul> <!-- /tabs -->
          </div> <!-- /example -->


          <hr class="bs-docs-separator">


          <h2>Usage</h2>

          <h3>Via data attributes</h3>
          <p>Add <code>data-toggle="dropdown"</code> to a link or button to toggle a dropdown.</p>
{% highlight html linenos %}
<div class="dropdown">
  <a class="dropdown-toggle" data-toggle="dropdown" href="#">Dropdown trigger</a>
  <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
    ...
  </ul>
</div>
{% endhighlight %}
          <p>To keep URLs intact, use the <code>data-target</code> attribute instead of <code>href="#"</code>.</p>
{% highlight html linenos %}
<div class="dropdown">
  <a class="dropdown-toggle" id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html">
    Dropdown <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
    ...
  </ul>
</div>
{% endhighlight %}

          <h3>Via JavaScript</h3>
          <p>Call the dropdowns via JavaScript:</p>
{% highlight js linenos %}
$('.dropdown-toggle').dropdown()
{% endhighlight %}

          <h3>Options</h3>
          <p><em>None</em></p>

          <h3>Methods</h3>
          <h4>$().dropdown('toggle')</h4>
          <p>A programmatic api for toggling menus for a given navbar or tabbed navigation.</p>
        </section>



        <!-- ScrollSpy
        ================================================== -->
        <section id="scrollspy">
          <div class="page-header">
            <h1>ScrollSpy <small>bootstrap-scrollspy.js</small></h1>
          </div>


          <h2>Example in navbar</h2>
          <p>The ScrollSpy plugin is for automatically updating nav targets based on scroll position. Scroll the area below the navbar and watch the active class change. The dropdown sub items will be highlighted as well.</p>
          <div class="bs-docs-example">
            <div id="navbarExample" class="navbar navbar-static">
              <div class="navbar-inner">
                <div class="container" style="width: auto;">
                  <a class="navbar-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 <b class="caret"></b></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" data-target="#navbarExample" data-offset="0" 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><!-- /example -->


          <hr class="bs-docs-separator">


          <h2>Usage</h2>

          <h3>Via data attributes</h3>
          <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) and <code>data-target=".navbar"</code> to select which nav to use. You'll want to use scrollspy with a <code>.nav</code> component.</p>
{% highlight html linenos %}
<body data-spy="scroll" data-target=".navbar">
  ...
</body>
{% endhighlight %}

          <h3>Via JavaScript</h3>
          <p>Call the scrollspy via JavaScript:</p>
{% highlight js linenos %}
$('.navbar').scrollspy()
{% endhighlight %}

          <div class="alert alert-info">
            <strong>Heads up!</strong>
            Navbar links 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>.
          </div>

          <h3>Methods</h3>
          <h4>.scrollspy('refresh')</h4>
          <p>When using scrollspy in conjunction with adding or removing of elements from the DOM, you'll need to call the refresh method like so:</p>
{% highlight js linenos %}
$('[data-spy="scroll"]').each(function () {
  var $spy = $(this).scrollspy('refresh')
});
{% endhighlight %}


          <h3>Options</h3>
          <p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-offset=""</code>.</p>
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
               <th style="width: 100px;">Name</th>
               <th style="width: 100px;">type</th>
               <th style="width: 50px;">default</th>
               <th>description</th>
             </tr>
            </thead>
            <tbody>
             <tr>
               <td>offset</td>
               <td>number</td>
               <td>10</td>
               <td>Pixels to offset from top when calculating position of scroll.</td>
             </tr>
            </tbody>
          </table>

          <h3>Events</h3>
          <table class="table table-bordered table-striped">
            <thead>
             <tr>
               <th style="width: 150px;">Event</th>
               <th>Description</th>
             </tr>
            </thead>
            <tbody>
             <tr>
               <td>activate</td>
               <td>This event fires whenever a new item becomes activated by the scrollspy.</td>
            </tr>
            </tbody>
          </table>
        </section>



        <!-- Tabs
        ================================================== -->
        <section id="tabs">
          <div class="page-header">
            <h1>Togglable tabs <small>bootstrap-tab.js</small></h1>
          </div>


          <h2>Example tabs</h2>
          <p>Add quick, dynamic tab functionality to transition through panes of local content, even via dropdown menus.</p>
For faster browsing, not all history is shown. View entire blame