Thanks. I'll try that ... I was able to get the "automatic select" working according to the FAQ example. I think the missing factor was the lack of any description of where that code needed to go (not obvious for newcomers to jquery, sorry) It just took some trial and error on my part to get it in the proper place.
Thanks for your help Klaus. --Chris On Jan 26, 8:40 am, Klaus Hartl <[email protected]> wrote: > On 25 Jan., 19:04, csb92376 <[email protected]> wrote: > > > SO... how do I select the newly added tab? The example code in the > > tabs FAQ doesn't do anything, and I'm having a very hard time trying > > to figure out how that example code works anyway. (I'm new to jquery > > and half this stuff is still voodoo to me) > > The example from the FAQ works fine for me. Make sure that you're > using jQuery UI 1.6rc5 together with jQuery 1.3.1 or jQuery UI 1.5.3 > with jQuery 1.2.6 - other combinations are not supported. > > > Also in addition to automatically selecting a newly added tab, I also > > need to select a tab if the user has already opened a link in a tab. > > Subsequent clicks on the same link should select the existing tab > > rather than open multiple copies of it. Is this possible? > > You could use the "one" bind method for that, e.g. the tab is created > once and afterwards another click event is bound to select the tab > from that point on. Just an outline, untestet: > > $('a.whatever').one('click', function() { > // add tab > ... > // bind new handler to select a tab instead of creating from now > on > $(this).click(function() { > // select the tab here > ... > return false; > }); > > }); > > --Klaus --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
