Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've been trying for 4-5 hours to figure this out for my own project. I finally found a solution that works, however I don't think it is how it was intended by the developers:</p> <pre><code> $("#tabs ul li a").each(function(index){ switch(index){ case 0: url = "pageone.php?q="+parameter break case 1: url = "pagetwo.php?q="+parameter break case 2: url = "pagethree.php?q="+parameter break } $(this).attr('href',url) }) </code></pre> <p>I've seen some posts where it is stated that one should change aria-controls property to the desired url. I tried that as well, but it seems that the tabs function references aria-controls when navigating between tabs, so changing it only gave me a "Mismatching fragment identifier" error.</p> <p><strong>Update:</strong> As the OP didn't need the ability to use parameters or change urls programatically, this would be sufficient for the HTML:</p> <pre><code>&lt;div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all"&gt; &lt;ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"&gt; &lt;li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active" aria-controls="tab1"&gt;&lt;a href="action.php"&gt;Tab 1&lt;/a&gt;&lt;/li&gt; &lt;li class="ui-state-default ui-corner-top" aria-controls="tab2"&gt;&lt;a href="action.php"&gt;Tab 2&lt;/a&gt;&lt;/li&gt; &lt;li class="ui-state-default ui-corner-top" aria-controls="tab3"&gt;&lt;a href="action.php"&gt;Tab 3&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="tab1" class="ui-tabs-panel ui-widget-content ui-corner-bottom"&gt;&lt;/div&gt; &lt;div id="tab2" class="ui-tabs-panel ui-widget-content ui-corner-bottom"&gt;&lt;/div&gt; &lt;div id="tab3" class="ui-tabs-panel ui-widget-content ui-corner-bottom"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Then of course the obvious initialization of tabs:</p> <pre><code>$("#tabs").tabs() </code></pre>
    singulars
    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.
 

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