So for another jquery newbie, where does the code need to go? Thanks!
On Jan 26, 9:04 am, csb92376 <c...@chrisbradford.com> wrote: > 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 <klaus.ha...@googlemail.com> wrote: > > > On 25 Jan., 19:04, csb92376 <c...@chrisbradford.com> wrote: > > > > SO... how do I select the newly added tab? The example code in the > > >tabsFAQ doesn't do anything, and I'm having a very hard time trying > > > to figure out how that example code works anyway. (I'mnewto 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() { > > //addtab > > ... > > // bindnewhandler 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 jquery-ui@googlegroups.com To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---