To select programmatically a tab, call this function with jLikeToSet arg:
$("#tabs").tabs( "select" , jLikeToSet);
when this function is executed, it's as if you have selected manually, so what's inside .bind('tabsselect' will be executed.
This is much cleaner than the one I have posted. I was not aware of the select option. +1
with this code, I select the tab (index in jLikeToset) but nothing happen when I click on the tabs. I'd like, in some case, set a tab and execute the coede ... your solution is ok but I need to be able to execute code when I click on tab too.
FYI, I used "e1","e2" ... but can be "aaaa", "bbbb", "azerty"
As of jQuery UI 1.8 the "select" option has been deprecated, and removed in 1.9. Use the "active" instead as below: $("#tabs").tabs("option", "active", tabIndex);