Home Forums WoodMart support forum Problem with category carusel Reply To: Problem with category carusel

#507406

Luke Nielsen
Keymaster

Hello,

Please add the below code to Theme Settings -> Custom JS -> On document ready, then recheck the issue.

(function($) {
		window.addEventListener('popstate', function() {
		var $owlWrappers = $('.main-page-wrapper [data-owl-carousel]:not(.wd-slider-wrapper)');
		if ( $owlWrappers.length > 0 ) {
			$owlWrappers.each(function() {
				var $this = $(this);

				if ($this.find('.owl-carousel').hasClass('owl-loaded')) {
					var $owl = $this.find('.owl-carousel');

					if ( ! $owl.hasClass('owl-loaded') ) {
						return;
					}

					$owl
						.trigger('destroy.owl.carousel')
						.removeClass('owl-loaded');

					$owl
						.find('.owl-stage-outer .owl-stage .owl-item')
						.children()
						.unwrap()

					$owl
						.find('.owl-stage-outer .owl-stage')
						.children()
						.unwrap()

					$owl
						.find('.owl-stage-outer')
						.children()
						.unwrap();

					$owl
						.find('.owl-nav, .owl-dots')
						.remove();
				}
			});

			woodmartThemeModule.owlCarouselInit();
		}
	});
})(jQuery);

Kind Regards