Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can track it by your URL like they did in <a href="https://stackoverflow.com/questions/1359343/getting-target-url-from-jquery-ui-tabs">this post</a>. The following code is just for example and can be done a lot nicer. I used the <code>active</code> property from the <a href="http://api.jqueryui.com/tabs/#option-active" rel="nofollow noreferrer">jquery ui tabs</a>. it works with the index of the element but perhaps its working with the #hash aswell did not test it. so in the example below i get the index of the tab and use it with <code>active</code> property;</p> <pre><code>&lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#tabs-1"&gt;Tab A&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tabs-2"&gt;Tab B&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tabs-3"&gt;Tab C&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="tabs-1"&gt;&lt;/div&gt; &lt;div id="tabs-2"&gt;&lt;asp:Button ID="someid" runat="server"/&gt;&lt;/div&gt; &lt;div id="tabs-3"&gt;&lt;/div&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; $(function () { var tabsOpts = {}, activeTab, activeTabIndex, urlCheck = doucment.location.href.split('#'); // urlCheck is an array so when there is more then one result // there is a hash found in the URL if( urlCheck.length &gt; 1 ) { activeTab = urlCheck[1]; // getting the index from the link activeTabIndex = $("#tabs li a[href="+ activeTab +"]").index(); // create new object options for the tabs tabsOpts = { active: activeTabIndex }; } $("#tabs").tabs(tabsOpts) .find('li a').each(function() { // get URL from the tab href var href = $.data(this, 'href.tabs'); // set URL with the href from your tab document.location = href; }); }); &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