Hi Dave,

Thank you! Both worked. And yeah I'll know the index of the tab so I
can use the second option.

Do you have anywhere to point me for good docs on jquery, jquery ui,
javascript in general?

On Sep 21, 7:19 am, Fontzter <[email protected]> wrote:
> 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 thetabyou are loading.  This would reapply the click event to 
> thelinks(again, not tested):
>
> $('#example').tabs({
>     load: function(event, ui) {
>         $('a', ui.panel).click(function() {
>              //changes the url for thetabitself 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 openinglinksin the currenttabrecommends 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 clickTabA 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 currenttabwithout page reload.
> > > b.html has an href back to a.html.
> > > * When I click above link, it fails andlinksto b.html without
> > > staying in currenttabor 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to