mikewertheim schrieb:
> Your suggestion is something that I had tried in one of my earlier
> iterations, but it didn't work. I've updated
> http://hyperreal.org/~mw/jquery.tabs/bad.html
> to do it that way. I'd appreciate it if you could take a look and see
> if you can identify what the root problem is.
>
>
>
> On Dec 1, 6:26 pm, jarredh <[EMAIL PROTECTED]> wrote:
>
>> the problem is "var $tabs = $('#main-content').tabs();" creates a new
>> tab component because the selector is different from your original
>> one.
>>
>> you create the tabs using: $("#main-content> ul").tabs();
>> so to select a tab you need to do: $("#main-content> ul").tabs
>> ('select', 2);
>>
>> - Jarred
>>
>> On Dec 2, 4:42 am, mikewertheim <[EMAIL PROTECTED]> wrote:
>>
>>
Please read again the post above, This code should work.
<script>
$(document).ready(function() {
$("#main-content> ul").tabs();
$("#main-content> ul").tabs('select', 2);
});
</script>
But the documentation suggests a different way to select a specific tab
on start.
$("#main-content> ul").*tabs*({ selected: 2 });
Here is "selected" a key in a json formatted argument list. In the other
calling convention
it is the name of the ui method to call.
Greetings
Sebastian
>>> I have a page that uses JQuery Tabs, and I want to be able to have a
>>> piece of javascript that will open up a particular tab.
>>>
>>> http://docs.jquery.com/UI/Tabsshowshow to do that. However, once the
>>> javascript opens up the desired tab, if the user then clicks on
>>> another tab, the other tab's contents are formatted incorrectly.
>>>
>>> To see this, first go tohttp://hyperreal.org/~mw/jquery.tabs/good.html
>>>
>>> Notice that there are 3 tabs, and take a look at the layout of the 3
>>> tabs. Specifically, notice that groups of checkboxes are displayed
>>> vertically.
>>>
>>> Now, go tohttp://hyperreal.org/~mw/jquery.tabs/bad.html
>>>
>>> The only difference between good.html and bad.html is that bad.html
>>> contains this piece of javascript, which opens up the far-right tab:
>>> var $tabs = $('#main-content').tabs();
>>> $tabs.tabs('select', 2);
>>>
>>> When bad.html is displayed, the far-right tab is opened up. However,
>>> if you then click on either of the other 2 tabs, their content is
>>> formatted incorrectly. Specifically, the vertical separation of the
>>> checkboxes is missing, so the checkboxes are run together on a single
>>> line. (And it's not just the checkboxes. It happens to the Save
>>> button as well.)
>>>
>>> Can anyone tell me how to fix this?
>>>
>>> Thanks,
>>> Mike
>>>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---