From 4b5111c49d00eeea1dbae5fbdf090228136fe0c1 Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Thu, 3 Apr 2025 17:41:43 +0300 Subject: [PATCH] single product visiblity? --- themes/oont-themev2/assets/css/product-slider.css | 4 ++-- themes/oont-themev2/assets/js/product-slider.js | 4 ++-- themes/oont-themev2/functions.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/themes/oont-themev2/assets/css/product-slider.css b/themes/oont-themev2/assets/css/product-slider.css index f601e4b1f..7189a571e 100644 --- a/themes/oont-themev2/assets/css/product-slider.css +++ b/themes/oont-themev2/assets/css/product-slider.css @@ -7,8 +7,8 @@ position: relative; display: block; overflow: hidden; - /*max-width: 600px;*/ - /*margin: auto;*/ + max-width: 600px; + margin: auto; } /* Slider item base */ diff --git a/themes/oont-themev2/assets/js/product-slider.js b/themes/oont-themev2/assets/js/product-slider.js index 016609d05..28ad6ec12 100644 --- a/themes/oont-themev2/assets/js/product-slider.js +++ b/themes/oont-themev2/assets/js/product-slider.js @@ -32,8 +32,8 @@ jQuery(document).ready(function($) { let currentIndex = 0; // Hide all except first - items.css({ position: 'absolute', opacity: 0, transition: 'opacity 0.3s ease' }); - items.eq(currentIndex).css({ opacity: 1, position: 'relative' }); + //items.css({ position: 'absolute', opacity: 0, transition: 'opacity 0.3s ease' }); + //items.eq(currentIndex).css({ opacity: 1, position: 'relative' }); // Create and insert dots if (items.length <= 1) return; diff --git a/themes/oont-themev2/functions.php b/themes/oont-themev2/functions.php index 7f23e6106..6fb6862a0 100644 --- a/themes/oont-themev2/functions.php +++ b/themes/oont-themev2/functions.php @@ -255,6 +255,6 @@ add_shortcode('product_image_slider', 'product_image_slider_shortcode'); function enqueue_slider_assets() { wp_enqueue_style('product-slider-style', get_stylesheet_directory_uri() . '/assets/css/product-slider.css',[],CHILD_THEME_OONT_THEME_VERSION,'all'); - wp_enqueue_script('product-slider-script', get_stylesheet_directory_uri() . '/assets/js/product-slider.js', ['jquery'], null, true); + wp_enqueue_script('product-slider-script', get_stylesheet_directory_uri() . '/assets/js/product-slider.js', ['jquery'], CHILD_THEME_OONT_THEME_VERSION, true); } add_action('wp_enqueue_scripts', 'enqueue_slider_assets');