I've read through the documentation for Jquery UI Tabs (1.7) and I believe I'm a bit in over my head with the Jquery tabs in terms of having specific events happen when a specific tab is clicked.
I have the basic tabs working, and I would simply like to set the focus on a text box when a specific tab is selected.
The UI Docs state you handle select events via:
$('.selector').tabs({
select: function(event, ui) { ... }
});
I'm not exactly sure what the above means. I've read through a few other examples here at stackoverflow, specficially example. Unfortunately the demo no longer works in the supplied answer.
My Current code for creating and selecting a specific tab using PHP is:
$("#tabs").tabs();
$("#tabs").tabs('option', 'selected', <?php echo $tabID-1; ?>);
Which works fine. I would like to add the ability for when the 4th tab is selected, I set the focus to a text box, something similiar to:
$('#subject').focus();