I have a carousel and each slide inside is contained in the class "app__slide" as you can see below. Each time in order to show a slide, I add the second class "showing" whose opacity is 1 to the slide.
<div class="app__slide">
<div class="app__left-contenu">
<div class="app__phone-background"></div>
<div class="app__titre">
<p>votre lookbook personnel</p>
</div>
<div class="app__text">
<p>Stockez par la suite vos photos et videos sur votre lookbook personnel, et partagez aussi vos photos et videos sur les réseaux sociaux. Enregistrez vos favoris.</p>
</div>
</div>
<div class="app__right-contenu">
<div class="app__phone-background"></div>
<div class="app__phone-images">
<img class="app__blured-image" src="./img/app/large/Iphone 7_01.png" alt="">
//- en savoir plus bouton
<div id="app__phone-bouton">
<div class="bouton-circle"></div>
<div class="bouton-inner"></div>
</div>
</div>
</div>
</div>
I want make a function in JS that permits me to blur the image in class "app__phone-images" then to show the text in class "app__text"
document.getElementById('app__phone-bouton').addEventListener('click', function() {
if(document.querySelector('.app__blured-image').style.filter = "blur(0px)")
document.querySelector('.app__blured-image').style.filter ="blur(10px)";
else
document.querySelector('.app__blured-image').style.filter = "blur(0px)";
});
My problem is that my function depends on class "showing" and I don't know how to select particularly the slide I want to do it. Can anyone show me how to do it please ?
P/S: I'm not allowed to use jQuery so I will appreciate much the answer in pure JS