In that case, thank you Klaus for the preventive comment.
On Wed, Jan 21, 2009 at 11:25 PM, Klaus Hartl <[email protected]> wrote: > > Sorry to hear that, but I was only referring to MorningZ's example, > which contained an outdated syntax and I wanted to prevent you (and > everybody else) to use it and wonder why it wouldn't work. > > I'll try to quote better next time. > > --Klaus > > > On 21 Jan., 22:43, Alexandre Plennevaux <[email protected]> wrote: >> Well, quite Frankly Klaus, i started this project 3 years ago and i >> used the tabs when it was but a plugin like another. >> The fact that now i have to integrate ui.core with ui.tabs is not >> really a good thing in my case: i don't have needs for anything else >> from the ui library, therefore i wish that alongside, there was a >> distro as a standalone plugin. >> I'm using jquery 1.3 so i've made myself a personalised ui distro >> using rc5, but now it breaks the hell out of my app, i don't have tabs >> anymore so here i go, back to the starting point, redoing things that >> were actually working well, but for that one missing callback. >> >> ah, it's hard to have a reproach to make to jquery. First in 3 years >> in my case, and it's not like i'm mad or anything. Just ... annoyed. >> >> :) >> >> On Wed, Jan 21, 2009 at 7:30 PM, Klaus Hartl <[email protected]> >> wrote: >> >> > Seems to be using a fairly outdated version. The event's name to bind >> > has changed since quite a while. Why not take a look at the >> > documentation: >> >http://docs.jquery.com/UI/Tabs#Events >> >> > --Klaus >> >> > On 21 Jan., 16:36, MorningZ <[email protected]> wrote: >> >> I've got this code working if it helps >> >> >> $("#TabContainer ul.tabs").tabs().bind("select.ui-tabs", function(e, >> >> ui) { >> >> //Code inside here runs when tab is selected >> >> >> }); >> >> >> On Jan 21, 10:29 am, Alexandre Plennevaux <[email protected]> >> >> wrote: >> >> >> > Hi all, >> >> >> > I'm using ui.tabs and i would like to trigger a function when a tab is >> >> > clicked, or more precisely, when a new panel gets shown. >> >> >> > I figured from the doc i should use the select callback but that does >> >> > not work... HEre is the code i use >> >> >> > var $tabs = $("#tabbedTextContent").tabs({ >> >> > selected: 0, >> >> > fx: { opacity: 'toggle', duration: >> >> > 200 }, >> >> > select: function(e, ui) >> >> > { >> >> > alert("hi"); //<!-- the >> >> > alert() never gets called >> >> > var $img = >> >> > $('#tabbedTextContent div.ui-tabs_panel:visible img.albumImage'); >> >> > if ($img.length) >> >> > { >> >> >> > $('#imageLegend').text($img.attr('title')); >> >> > } >> >> > } >> >> > }); >> >> >> > So, the tabs are displayed and work correctly, but the select >> >> > callback (namely, the alert() call) never gets fired... >> >> >> > Right after that block of code i have >> >> >> > $('#tabbedTextContent img.albumImage') >> >> > .css('cursor', 'pointer') >> >> > //.attr('title', "Click to view the >> >> > next image") >> >> > .click(function() >> >> > { // in image albums, clicking on an >> >> > image brings the user to the next image >> >> > var currentTab = >> >> > $tabs.data('selected.tabs'); >> >> >> > $('#imageLegend').text($(this).attr('title')); >> >> > var nextTab = (currentTab < >> >> > $tabs.length - 1) ? currentTab + 1 : 0; >> >> > $tabs.tabs('select', nextTab); >> >> > return false; >> >> > }); >> >> >> > which works just fine.

