Answer the question
In order to leave comments, you need to log in
Absolute positioning of slick slider?
Hello! There are 2 slick sliders with pagers, I want to overlay one slider on the other.
here is the code
<div class="main">
<div class="product-slder__in">
<div class="product-border1">
<div><img class="b1-1" src="img/b1-1.png"></div>
<div><img class="b1-1" src="img/b1-1.png"></div>
</div>
<div class="product-pager1">
<div>1</div>
<div>2</div>
</div>
</div>
<div class="product-slder__in2">
<div class="product-border2">
<div><img class="b1-1" src="img/b1-1.png"></div>
<div><img class="b1-1" src="img/b1-1.png"></div>
</div>
<div class="product-pager2">
<div>1</div>
<div>2</div>
</div>
</div>
</div>
.main{
position:relative;
}
.product-slder__in, .product-slder__in2{
position:absolute;
top:0;
}
jQuery('.product-border1').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.product-color1'
});
jQuery('.product-color1').slick({
slidesToShow: 2,
slidesToScroll: 1,
asNavFor: '.product-border1',
// dots: true,
focusOnSelect: true
});
jQuery('.product-border2').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.product-color2'
});
jQuery('.product-color2').slick({
slidesToShow: 2,
slidesToScroll: 1,
asNavFor: '.product-border2',
// dots: true,
focusOnSelect: true
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question