Please note that selecting a tab automatically loads it as well, thus
with your code you're loading twice which may cause some unexpected
results.
The next problem here is that the tab content loads asynchronously,
thus at the time you try to acess the inner tabs they're not be loaded
yet. You need to move that code into the load handler of the outer
tabs.
Here's the reviewed code:
$('#tabtop').tabs({
selected: 2,
load: function(e, ui) {
var $innertabs = $('#innermemorialtabs', ui.panel);
if ($innertabs.length) {
$innertabs.tabs(); // <= initialized like this the
selected tab will always be 0
selected = $innertabs.data('selected.tabs');
if (selected) {
$innertabs.tabs('select', 0);
}
}
});
--Klaus
On 22 Okt., 13:09, LouisHeim <[EMAIL PROTECTED]>
wrote:
> Hello, I have managed to select a tab using a text link as described
> in an example provided in the faq. However, when I try to select a tab
> within that tab the layout is messed up.
> For example:
> ...
> $maintabs = $('#tabtop').tabs();
> $maintabs.tabs('select', 2);
> $maintabs.tabs('load', 2);
> $innertabs = $('#innermemorialtabs').tabs();
> $selected = $innertabs.data('selected.tabs');
> if ( $selected != 0 ) {
> $innertabs.tabs('select', 0);
> }
> $innertabs.tabs('load', 0);
> ...
> I am no Javascript fundi and would appreciate any help or advice you
> can offer. With Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---