Note that there are some explanatory texts on larger screens.

plurals
  1. PObootstrap tab on active changed
    text
    copied!<p>i have this tab in bootstrap:</p> <pre><code>&lt;ul class="nav nav-tabs" id="feedtab"&gt; &lt;li class="active"&gt;&lt;a href="#atlass" data-toggle="tab"&gt;Atlass&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#avi" data-toggle="tab"&gt;Aviation&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#proc" data-toggle="tab"&gt;Processing&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#it" data-toggle="tab"&gt;IT&amp;S&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div class="tab-content"&gt; &lt;div class="tab-pane active" id="atlass"&gt;&lt;div id="updates" data-id-type="1"&gt;&lt;div class="alert alert-default well" style="background-color: #f1f1f1"&gt;&lt;i class="fa fa-spinner fa-spin"&gt;&lt;/i&gt; Portal is Initilizing... Please Wait.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="tab-pane" id="avi"&gt;&lt;div class="well" style="background-color: lightsteelblue;"&gt;Aviation Feed Will go here.&lt;/div&gt;&lt;/div&gt; &lt;div class="tab-pane" id="proc"&gt;&lt;div class="well" style="background-color: lightsteelblue;"&gt;Processing Feed Will go here.&lt;/div&gt;&lt;/div&gt; &lt;div class="tab-pane" id="it"&gt;&lt;div class="well" style="background-color: lightsteelblue;"&gt;IT&amp;S Feed will go here.&lt;/div&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>How do i have an event or soemthing in jquery for when the active tab is changed?</p> <p>i want to call a javascript function when the active tab is changed.</p> <p>i've tried this but dosent work:</p> <pre><code>&lt;script&gt; $('#feedtab [data-toggle="tab"]').on('shown.bs.tab', function (e) { alert('test'); }) &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload