With jQuery UI tabs, how can I run code after a click on a tab?
API HAS CHANGED. This event is now "activate"/"tasbactivate"; see http://api.jqueryui.com/tabs/#event-activate
----- OLD Answer below -----------
Based on the question it's the tabsshow (not the tabsload) event that is desired...event is triggered when a tab is shown.
Code examples: ( from http://jqueryui.com/demos/tabs/ )
Supply a callback function to handle the show event as an init option.
$( ".selector" ).tabs({
show: function(event, ui) { ... }
});
Bind to the show event by type: tabsshow.
$( ".selector" ).bind( "tabsshow", function(event, ui) {
...
});
The event is useful if you want to set focus on control or similar.
$( ".selector" ).tabs({
load: function(event, ui) { ... }
});
from http://jqueryui.com/demos/tabs/
looks like you could bind to tabsload or tabsshow:
http://jqueryui.com/demos/tabs/#Events
example
$('#example').bind('tabsshow', function(event, ui) { ... });