From cde39f7b785e5931d204ea33937adfbd7194204b Mon Sep 17 00:00:00 2001 From: ggam Date: Wed, 14 Aug 2013 19:53:37 +0200 Subject: [PATCH 1/2] Fixed indentation in JavaScript example --- javascript.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript.html b/javascript.html index 3797dbf65d..152b9b08e5 100644 --- a/javascript.html +++ b/javascript.html @@ -936,7 +936,7 @@ $('#example').tooltip(options) {% highlight js %} $('#myTooltip').on('hidden.bs.tooltip', function () { -// do something… + // do something… }) {% endhighlight %} From 2be8a5a2457141edf823e853b8cacec8f997f2e4 Mon Sep 17 00:00:00 2001 From: ggam Date: Wed, 14 Aug 2013 19:57:54 +0200 Subject: [PATCH 2/2] Removed trailing semicolons from examples --- javascript.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/javascript.html b/javascript.html index 152b9b08e5..fd0a5a027f 100644 --- a/javascript.html +++ b/javascript.html @@ -683,17 +683,17 @@ $('#myScrollspy').on('activate.bs.scrollspy', function () {

Enable tabbable tabs via JavaScript (each tab needs to be activated individually):

{% highlight js %} $('#myTab a').click(function (e) { - e.preventDefault(); - $(this).tab('show'); + e.preventDefault() + $(this).tab('show') }) {% endhighlight %}

You can activate individual tabs in several ways:

{% highlight js %} -$('#myTab a[href="#profile"]').tab('show'); // Select tab by name -$('#myTab a:first').tab('show'); // Select first tab -$('#myTab a:last').tab('show'); // Select last tab -$('#myTab li:eq(2) a').tab('show'); // Select third tab (0-indexed) +$('#myTab a[href="#profile"]').tab('show') // Select tab by name +$('#myTab a:first').tab('show') // Select first tab +$('#myTab a:last').tab('show') // Select last tab +$('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed) {% endhighlight %}

Markup