There are two js plugins that I’m using. One is “BackgroundCheck – http://www.kennethcachia.com/background-check/cross-origin.html” which works with jquery to detect background contrast and based on that applies black/white color to elements, and the other one is “Swiper touch slider – https://swiperjs.com”. Both are well-known plugins in their respective categories.
The code below initiates the Swipder slider:
const swiper = new Swiper('.swiper', {
direction: 'vertical',
loop: true,
pagination: {
el: '.swiper-pagination',
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
scrollbar: {
el: '.swiper-scrollbar',
},
});
All I want is that when every time a slide is swiped or any navigation/pagination element is clicked, the BackgroundCheck plugin is initiated/refreshed:
BackgroundCheck.refresh();
You can see the BackgroundCheck in action on a different slider here: http://www.kennethcachia.com/background-check/slider.html
I want to emulate the functionality with the Swiper slider. I just can’t make it work as JS is not my forte and I’m kinda stuck here.