tags:

views:

14

answers:

2

Hi,

I've implemented jquery tabs and want to call the page they are on in two ways. Firstly with the first tab open and the others hidden which works fine. But secondly I want tab 4 to be visible when landing on the page. So I have simply duplicated the page - Page A opens with the first tab in view. Page B has this code....

<script type="text/javascript">
    $(function() {
      $("#tabs").tabs();
    });
</script> 
<script type="text/javascript"> 
    $(function() { 
      $("#tabs").tabs( 'select' , 3 ) 
    }); 
</script>

and opens the forth tab. BUT it opens the first tab first then flashes to tab 4.

How can I get the page to open tab 4 initially without opening the first tab first. Hope you can follow my ramble!!!

Nick

A: 

That would be how to open to the 4th tab using their API.

Perhaps you can try hiding the tab div, creating it, and then showing it in the show event when the 4th tab is shown (which will happen after everything is initialized).

Justin Ethier
A: 

There does not appear to be an obvious solution. One suggestion I have seen is to use jQuery to keep the tabs hidden until they have loaded and then show them after the selection has taken place.

JasCav