$( \'#xxx\' ).tabs({ select: function(event, ui) { var theSelectedTab2 = ui.index; if (theSelectedTab2 == 0) { $(\'ul li.ep_s1\').removeClass(\'ep_s1\').addClass(\'e
Perhaps the following line, after the tabs initialize:
$( '#xxx' ).tabs('select', 0);
Hopefully, it will also trigger the event you want.