How to change the tab order of the Vehicle Detail/Comments box.
In some instances you may want to show the description of the vehicle before showing the equipment details of the vehicle, this code will switch the two tabs and display it as ‘Comments/Vehicle Detail’
Add this javascript code to your theme or a code plugin like “Scripts n Styles” place in the </body> section.
[cc lang=’javascript’ ]
/*changes description tabs order*/
jQuery(document).ready(function(){
if (jQuery(‘#armadillo-detail #armadillo-inventory-tabs #armadillo-description’).length){
jQuery(‘#armadillo-inventory-tabs’).tabs(‘destroy’);
jQuery(‘#armadillo-inventory-tabs ul li’).each(function(){
tab = jQuery(this);
if (tab.children().text().match(/comment/i) != null) {
first_tab = tab;
} else if (tab.children().text().match(/detail/i) != null) {
second_tab = tab;
}
});
jQuery(‘#armadillo-inventory-tabs ul’).html();
jQuery(‘#armadillo-inventory-tabs ul’).append( first_tab );
jQuery(‘#armadillo-inventory-tabs ul’).append( second_tab );
jQuery(‘#armadillo-inventory-tabs’).tabs();
}
});
[/cc]