Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to call bootstrap tab from asp.net source code
    primarykey
    data
    text
    <p>I have the following elements in my asp.net page</p> <pre><code>&lt;ul class="nav nav-tabs" id="myTab"&gt; &lt;li class="active"&gt;&lt;a href="#tabs-1" data-toggle="tab"&gt;Phase 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tabs-2" data-toggle="tab"&gt;Phase 2&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tabs-3" data-toggle="tab"&gt;Phase 3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tabs-4" data-toggle="tab"&gt;Summary&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div class="tab-content"&gt; &lt;div class="tab-pane active" id="tabs-1"&gt; Tab 1 Content &lt;asp:Button ID="Button2" runat="server" Text="next" /&gt; &lt;/div&gt; &lt;div id="tabs-2" class="tab-pane"&gt; Tab 2 Content &lt;asp:Button ID="Button2" runat="server" Text="next" /&gt; &lt;/div&gt; &lt;div id="tabs-3" class="tab-pane"&gt; Tab 3 Content &lt;asp:Button ID="Button2" runat="server" Text="next" /&gt; &lt;/div&gt; &lt;div id="tabs-4" class="tab-pane"&gt; Tab 4 Content &lt;asp:Button ID="Button2" runat="server" Text="Save" /&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I want display the content of each tab based on the button click() from the source code using JavaScript provided by the site:</p> <p>1 - Enable tabbable tabs via JavaScript (each tab needs to be activated individually):</p> <pre><code>$('#myTab a').click(function (e) { e.preventDefault() $(this).tab('show') }) </code></pre> <p>2- You can activate individual tabs in several ways:</p> <pre><code>$('#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) </code></pre> <p>Ref : <a href="http://getbootstrap.com/javascript/" rel="nofollow">http://getbootstrap.com/javascript/</a></p> <p>The problem is that I am not so good in JavaScript,now learning it. I need a small help about performing the task</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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