Hi Community,
I have a problem with some custom code of mine. The custom code below is used to trigger the slider dots in the navigation. The code and the slider work perfectly until I implemented the twentytwenty before/after slider. The slider of zurb needs jQuery v2 and it seems that this causes the problem.
<script src="https://code.jquery.com/jquery-2.2.0.min.js" integrity="sha256-ihAoc6M/JPfrIiIeayPE9xjin4UWjsx2mjW/rtmxLM4=" crossorigin="anonymous"></script>
If I remove the jQuery v2 implementation my custom slider works, but the twentytwenty slider won’t. I need both sliders in my webpage.
Here is the Read-Only Link and also the Live site.
// Community Slider
$('#slide-1').click(function(){
$('.w-slider-nav div:nth-child(1)').trigger('tap');
$('#slide-2').removeClass('is--active');
$('#slide-3').removeClass('is--active');
$(this).addClass('is--active');
});
$('#slide-2').click(function(){
$('.w-slider-nav div:nth-child(2)').trigger('tap');
console.log($('.w-slider-nav div:nth-child(2)'));
$('#slide-1').removeClass('is--active');
$('#slide-3').removeClass('is--active');
$(this).addClass('is--active');
});
$('#slide-3').click(function(){
$('.w-slider-nav div:nth-child(3)').trigger('tap');
$('#slide-1').removeClass('is--active');
$('#slide-2').removeClass('is--active');
$(this).addClass('is--active');
});
// Community Slider END