================================================== -->
<header class="jumbotron subhead" id="overview">
<div class="container">
- <h1>Javascript for Bootstrap</h1>
+ <h1>JavaScript for Bootstrap</h1>
<p class="lead">Bring Bootstrap's components to life—now with 12 custom jQuery plugins.
</div>
</header>
================================================== -->
<section id="overview">
<div class="page-header">
- <h1>Javascript in Bootstrap</h1>
+ <h1>JavaScript in Bootstrap</h1>
</div>
<h3>Individual or compiled</h3>
</pre>
<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>
+ <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 hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<h2>Usage</h2>
<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>
+ <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>
<pre class="prettyprint linenums"><button type="button" data-toggle="modal" data-target="#myModal">Launch modal</button></pre>
- <h3>Via javascript</h3>
- <p>Call a modal with id <code>myModal</code> with a single line of javascript:</p>
+ <h3>Via JavaScript</h3>
+ <p>Call a modal with id <code>myModal</code> with a single line of JavaScript:</p>
<pre class="prettyprint linenums">$('#myModal').modal(options)</pre>
<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>
+ <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>
</div>
</pre>
- <h3>Via javascript</h3>
- <p>Call the dropdowns via javascript:</p>
+ <h3>Via JavaScript</h3>
+ <p>Call the dropdowns via JavaScript:</p>
<pre class="prettyprint linenums">$('.dropdown-toggle').dropdown()</pre>
<h3>Options</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.</p>
<pre class="prettyprint linenums"><body data-spy="scroll" data-target=".navbar">...</body></pre>
- <h3>Via javascript</h3>
- <p>Call the scrollspy via javascript:</p>
+ <h3>Via JavaScript</h3>
+ <p>Call the scrollspy via JavaScript:</p>
<pre class="prettyprint linenums">$('#navbar').scrollspy()</pre>
<div class="alert alert-info">
</pre>
<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>
+ <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>
<h2>Usage</h2>
- <p>Enable tabbable tabs via javascript (each tab needs to be activated individually):</p>
+ <p>Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p>
<pre class="prettyprint linenums">
$('#myTab a').click(function (e) {
e.preventDefault();
</pre>
<h3>Markup</h3>
- <p>You can activate a tab or pill navigation without writing any javascript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the Bootstrap tab styling.</p>
+ <p>You can activate a tab or pill navigation without writing any JavaScript by simply specifying <code>data-toggle="tab"</code> or <code>data-toggle="pill"</code> on an element. Adding the <code>nav</code> and <code>nav-tabs</code> classes to the tab <code>ul</code> will apply the Bootstrap tab styling.</p>
<pre class="prettyprint linenums">
<ul class="nav nav-tabs">
<li><a href="#home" data-toggle="tab">Home</a></li>
<h2>Usage</h2>
- <p>Trigger the tooltip via javascript:</p>
+ <p>Trigger the tooltip via JavaScript:</p>
<pre class="prettyprint linenums">$('#example').tooltip(options)</pre>
<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-animation=""</code>.</p>
+ <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-animation=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<div class="clearfix"></div>
</div>
- <p>No markup shown as popovers are generated from javascript and content within a <code>data</code> attribute.</p>
+ <p>No markup shown as popovers are generated from JavaScript and content within a <code>data</code> attribute.</p>
<h3>Live demo</h3>
<div class="bs-docs-example" style="padding-bottom: 24px;">
<h2>Usage</h2>
- <p>Enable popovers via javascript:</p>
+ <p>Enable popovers via JavaScript:</p>
<pre class="prettyprint linenums">$('#example').popover(options)</pre>
<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-animation=""</code>.</p>
+ <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-animation=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<h2>Usage</h2>
- <p>Enable dismissal of an alert via javascript:</p>
+ <p>Enable dismissal of an alert via JavaScript:</p>
<pre class="prettyprint linenums">$(".alert").alert()</pre>
<h3>Markup</h3>
<h2>Usage</h2>
- <p>Enable buttons via javascript:</p>
+ <p>Enable buttons via JavaScript:</p>
<pre class="prettyprint linenums">$('.nav-tabs').button()</pre>
<h3>Markup</h3>
<p>Just add <code>data-toggle="collapse"</code> and a <code>data-target</code> to element to automatically assign control of a collapsible element. The <code>data-target</code> attribute accepts a css selector to apply the collapse to. Be sure to add the class <code>collapse</code> to the collapsible element. If you'd like it to default open, add the additional class <code>in</code>.</p>
<p>To add accordion-like group management to a collapsible control, add the data attribute <code>data-parent="#selector"</code>. Refer to the demo to see this in action.</p>
- <h3>Via javascript</h3>
+ <h3>Via JavaScript</h3>
<p>Enable manually with:</p>
<pre class="prettyprint linenums">$(".collapse").collapse()</pre>
<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-parent=""</code>.</p>
+ <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-parent=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<h3>Via data attributes</h3>
<p>...</p>
- <h3>Via javascript</h3>
+ <h3>Via JavaScript</h3>
<p>Call carousel manually with:</p>
<pre class="prettyprint linenums">$('.carousel').carousel()</pre>
<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-interval=""</code>.</p>
+ <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-interval=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<h3>Via data attributes</h3>
<p>Add data attributes to register an element with typeahead functionality as shown in the example above.</p>
- <h3>Via javascript</h3>
+ <h3>Via JavaScript</h3>
<p>Call the typeahead manually with:</p>
<pre class="prettyprint linenums">$('.typeahead').typeahead()</pre>
<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-source=""</code>.</p>
+ <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-source=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
It's up to you to maintain the dimensions of an element when toggling between relative and fixed positions. To see how this is done, refer to this pages subnavigation.
</div>
- <h3>Via javascript</h3>
- <p>Call the affix plugin via javascript:</p>
+ <h3>Via JavaScript</h3>
+ <p>Call the affix plugin via JavaScript:</p>
<pre class="prettyprint linenums">$('#navbar').affix()</pre>
<h3>Methods</h3>
</pre>
<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-y=""</code>.</p>
+ <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-y=""</code>.</p>
<table class="table table-bordered table-striped">
<thead>
<tr>