Home Forums WoodMart support forum Single product tabs Reply To: Single product tabs

#395117

Hello,

Please replace the code with this one:

if (jQuery(window).width() <= 1024) {
			setTimeout( function(){ 
				jQuery('.woocommerce-tabs.wd-accordion').each(function() {
					let activeClass  = 'wd-active';
					let time         = 300;
					let firstItem    = jQuery('.wd-accordion > .wd-accordion-item').first();
					let secondItem   = firstItem.next();
					let getTitle     = $item => $item.find('> .wd-accordion-title');
					let getContent   = $item => $item.find('> .wd-accordion-content');

					getTitle( firstItem ).removeClass(activeClass);
					getContent( firstItem ).stop(true, true).slideUp(time).removeClass(activeClass);

					getTitle( secondItem ).addClass(activeClass);
					getContent( secondItem ).stop(true, true).slideDown(time).addClass(activeClass);

					jQuery(this).addClass('wd-inited');
				});
			}, 500);
}

Best Regards