Ok, thank you very much for your answer. You helped me a lot :-)

This code is now working:

function openPage(url, title)
{
        $("#content ul li a:first").html("<span>" + title + "</span>");
        $("#content").tabs("url", 0, url).tabs("select", 0).tabs("load", 0);
}

Also i actually need .tabs("load", 0) ... if left away the new tab is
select and the new ajax url is set but it isnt reloaded.

Greetings,
Tobias

On 27 Jul., 21:39, Klaus Hartl <[email protected]> wrote:
> There is no special API for changing the label, it's simply jQuery:
>
> $('#content .ui-tabs-nav li:first').html("new title");
>
> Also note that the select method already takes care of loading, so
> that the following is sufficient (I've also added chaining to save a
> query there):
>
> function loadPage(url)
> {
>     $('#content .ui-tabs-nav li:first').html("new title");
>     $("#content").tabs("url", 0, url).tabs("select", 0);
>
> }
>
> --Klaus
>
> On 27 Jul., 21:19, "[email protected]" <[email protected]> wrote:
>
>
>
> > Hello,
>
> > i've written a small function to open a link in the first tab....
>
> > function loadPage(url)
> > {
> >         $("#content").tabs("url", 0, url);
> >         $("#content").tabs("select", 0);
> >         $("#content").tabs("load", 0);
>
> > }
>
> > The only problem is, that i can't change the label of the tab to match
> > the new content. I didn't find any hints in this group yep. Anyone has
> > an idea?
>
> > Thanks,
>
> > Tobias
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to