if you use the click event of tab it pass 3 parameters Tab clicked, Tab toShow, TabtoHide so you can write something like var $tabs = $('#foo).tabs({click: function(clicked, toShow, toHide) { var title = toHide.title; .....
}); On Feb 14, 6:28 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks, but let me throw in an additional wrinkle. Let's say there > are three tabs, with titles "Properties", "General", and "Misc" and > you are on tab "General" and then click on tab "Misc". The below > functionality would get called, even though it is only supposed to be > called if you are leaving the "Properties" tab. Any way to adjust the > below for this situation? > > - Dave > > On Feb 14, 6:05 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote: > > > > > On Feb 14, 9:25 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > Thanks, Klaus. I only want to run this form validation if a user is > > > leaving the tab with a.title = "Properties". How do I screen for that > > > prior to executing the function? - Dave > > > var $tabs = $('#foo').tabs().bind('select.ui-tabs', function(e, ui) { > > if (ui.tab.title.toLowerCase() != 'properties') > > return validateForm( $('#tabcontent div.ui-tabs- > > container:visible form')[0] ); > > > }); > > > --Klaus- Hide quoted text - > > - Show quoted text -