single product visiblity?
This commit is contained in:
parent
e781851d7e
commit
4b5111c49d
3 changed files with 5 additions and 5 deletions
|
@ -7,8 +7,8 @@
|
|||
position: relative;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
/*max-width: 600px;*/
|
||||
/*margin: auto;*/
|
||||
max-width: 600px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/* Slider item base */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue