Tag Archives: tabs

How to Select a jQuery UI tab with Javascript

The documentation for jQueryUI tabs is a bit cryptic. It was not immediately clear how to Select a jQuery UI tab with Javascript, but I got it working with this little bit of code: $( “#tabs” ).tabs( ‘select’, “#profile” ); #profile is the id of the tab you would like to select, and #tabs is the element you set up the tabs on by calling $( “#tabs” ) You may also have to use jQuery instead of $ if you have noConflict mode enabled, the tabs need to be initialized first (as previously mentioned), and it is possible you will need to put all this info inside the ‘jQuery document ready’ wrapper: jQuery(function($){ $( “#tabs” ).tabs( ‘select’, “#profile” ); });

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment