mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-29 21:52:22 +01:00
Merge pull request #9531 from ggam/docs-indentation
Fixed inconsistencies in JavaScript examples
This commit is contained in:
commit
3890ab3987
@ -683,17 +683,17 @@ $('#myScrollspy').on('activate.bs.scrollspy', function () {
|
|||||||
<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>
|
||||||
{% highlight js %}
|
{% highlight js %}
|
||||||
$('#myTab a').click(function (e) {
|
$('#myTab a').click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault()
|
||||||
$(this).tab('show');
|
$(this).tab('show')
|
||||||
})
|
})
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
<p>You can activate individual tabs in several ways:</p>
|
<p>You can activate individual tabs in several ways:</p>
|
||||||
{% highlight js %}
|
{% highlight js %}
|
||||||
$('#myTab a[href="#profile"]').tab('show'); // Select tab by name
|
$('#myTab a[href="#profile"]').tab('show') // Select tab by name
|
||||||
$('#myTab a:first').tab('show'); // Select first tab
|
$('#myTab a:first').tab('show') // Select first tab
|
||||||
$('#myTab a:last').tab('show'); // Select last tab
|
$('#myTab a:last').tab('show') // Select last tab
|
||||||
$('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed)
|
$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
<h3>Markup</h3>
|
<h3>Markup</h3>
|
||||||
@ -936,7 +936,7 @@ $('#example').tooltip(options)
|
|||||||
</div><!-- /.bs-table-scrollable -->
|
</div><!-- /.bs-table-scrollable -->
|
||||||
{% highlight js %}
|
{% highlight js %}
|
||||||
$('#myTooltip').on('hidden.bs.tooltip', function () {
|
$('#myTooltip').on('hidden.bs.tooltip', function () {
|
||||||
// do something…
|
// do something…
|
||||||
})
|
})
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user