$('body').on('click', '.btnAdd', function (event) {
event.preventDefault();
$('.Slider').slick('unslick');
$('.Slider').slick(SlickSlider());
});
function SlickSlider() {
return {
infinite: true,
slidesToShow: 1,
slidesToScroll: 1
};
}
slickCarousel();
function slickCarousel() {
$('.skills_section').slick('unslick');
$('.skills_section').slick({
infinite: true,
slidesToShow: 3,
slidesToScroll: 1
});
}
"css": {
"snippets": {
"md": "@include max-s(${1}px) {\n ${0} \n}"
}
}
<section class="slider">
<div class="flexslider slider1">
<ul class="slides">
<li> </li>
<li> </li>
</ul>
</div>
<div id="carousel" class="flexslider carousel">
<ul class="slides">
<li> </li>
<li> </li>
</ul>
</div>
</section>
<section class="slider">
<div class="flexslider slider1">
<ul class="slides">
<li> </li>
<li> </li>
</ul>
</div>
<div id="carousel" class="flexslider carousel">
<ul class="slides">
<li> </li>
<li> </li>
</ul>
</div>
</section>
<script type="text/javascript">
$(window).load(function(){
$('.carousel').each(function() {
var slider1 = $(this).parent().children(".slider1");
$(this).flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 210,
itemMargin: 5,
asNavFor: slider1
});
});
$('.slider1').each(function() {
var carousel = $(this).parent().children(".carousel");
$(this).flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
sync: carousel,
start: function(slider){
$('body').removeClass('loading');
}
});
});
});
</script>