How to do stuff when a tab is select?

How to do stuff when a tab is select?


Hi
I want to to set certain fields back to default when a person switches
a tab(so if tab one is shown then tabs 2 and 3 controls will go back
to default). None of the tabs are ajax but I am unsure how to do this.
I tried looking at the documentation but I just can't figure out how
to do this.
I tried to use shown but I could not get it too work:
$('.selector').tabs({
show: function(event, ui) { }
});
I don't even think I have the .selector class. When I pasted it in and
tried to see through the firebug debugger I never saw this code being
activated when the code the tabs switched.