The subsequent load is just a jQuery load and not a tabs load event so
the click doesn't apply. I think you could achieve what you want by
applying the logic recursively using the .live() call like this
(untested, lmk if it works):
$('#example').tabs({
load: function(event, ui) {
$('a', ui.panel).live("click", function() {
$(ui.panel).load(this.href);
return false;
});
}
});
However, it may be better to call the tabs load if you know the index
of the tab you are loading. This would reapply the click event to the
links (again, not tested):
$('#example').tabs({
load: function(event, ui) {
$('a', ui.panel).click(function() {
//changes the url for the tab itself and reloads it
rather than just loading content into it
$(#example).tabs("url", 1, this.href).tabs("load",1);
return false;
});
}
});
Hth,
Dave
On Sep 20, 7:23 pm, John P <[email protected]> wrote:
> Hello,
>
> You can view an example of my problem here. Hopefully this illustrates
> better than my poor articulation :)
>
> http://johnpancoast.com/tabs
>
> On Sep 18, 7:17 pm, John P <[email protected]> wrote:
>
> > Hello,
>
> > First of all, my first experiences with jquery UI have been awesome.
>
> > Your example
> > athttp://docs.jquery.com/UI/Tabs#...open_links_in_the_current_tab_inste...
> > for opening links in the current tab recommends doing this.
>
> > $('#example').tabs({
> > load: function(event, ui) {
> > $('a', ui.panel).click(function() {
> > $(ui.panel).load(this.href);
> > return false;
> > });
> > }
>
> > });
>
> > This works, but only for the first page. Meaning this
>
> > * I click Tab A which loads a.html with ajax (just an href to the
> > other page as in examples).
> > * Above works and the content of a.html has a link to b.html which I
> > click
> > * Above works and loads the page in current tab without page reload.
> > b.html has an href back to a.html.
> > * When I click above link, it fails and links to b.html without
> > staying in current tab or current page?
>
> > It's almost as if I have to tell jquery to reload the above. Like it
> > doesn't recognize the above example after one clivk. Thanks in advans
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---