Creating a link to a particular tab
I'm integrating the jquery UI tab structure on a website, and would like to be able to create a link to a particular tab.
The basic structure is:
<div id="placetabs">
<ul id="menutabs">
<li><a href="#panel1"><span>Tab1</span></a></li>
<li><a href="#panel2"><span>Tab2</span></a></li>
<li class="last"><a href="#panel3"><span>Tab3</span></a></li>
</ul>
<div id="panel1" class="tabscontent"></div>
<div id="panel2" class="tabscontent"></div>
<div id="panel3" class="tabscontent"></div>
</div>
I wanted to be able to create a link originating on another page so that the user winds up on a particular tab. I'd tried <a href page.html#panel2> to activate the second tab when the page loads. And it sort of does, but the page scrolls down a bit, which is distracting .
I'd like the page to load visually just like it would if the table initialized to the first tab, but displaying the information from the second tab. Is there a way to make such a call?
Thanks!