BackgroundCheck.refresh() refreshing but not updating class
I'm using this plugin with the jQuery Revolution slider and am having problems getting the refresh to work correctly on new slides. It seems that it is refreshing, but it's not adding the correct background class. Here's the code I have:
document.addEventListener('DOMContentLoaded', function() {
var img = document.querySelector('.tp-bgimg');
img.setAttribute('crossorigin', '');
img.src = img.getAttribute('src');
// Prepare BackgroundCheck
BackgroundCheck.init({
targets: '#navigation ul li a',
images: img
});
revapi1.bind("revolution.slide.onchange", function(e) {
BackgroundCheck.refresh();
});
});
Any idea why it's not working correctly? Seems it's only finding the first slide. When I view the developer tool in Chrome it shows it's not affecting the other slides, so it's only refreshing for the first slide. Could that be because RevSlider adds that code through JS instead of HTML?
I'm having the same tragedy with revolution slider... And I can't find a way to achive it.
¿Did you found it in the end?
Same problem here without any slider ... Just a normal dynamic div ( hamburger menu ) . Can not refresh when menu appears .