Snippets: Add Unique Classnames To Each VC Tabs Tab

This code will add a unique class to each tab and tab content in the format of tab-index-{count} so if you need to target tabs independently via CSS it would be possible.

// Add unique classnames to VC tabs
add_action( 'wp_footer', function() { ?>

	<script>
	( function( $ ) {

		$( document ).on( 'ready', function() {

			$( '.vc_tta-tabs' ).each( function() {
				var $tabs = $( this ).find( '.vc_tta-tab' );
				$tabs.each( function( index, value ) {
					$( this ).addClass( 'tab-index-' + index );
				} );
				var $tabContent = $( this ).find( '.vc_tta-panel' );
				$tabContent.each( function( index, value ) {
					$( this ).addClass( 'tab-index-' + index );
				} );
			} );

		} );

	} ) ( jQuery );
	</script>

<?php } );
All PHP snippets should be added via a child theme's functions.php file.