I'm trying to remove the class "is-active" and "is-visbile" that's in the picture. But I don't know what I'm doing wrong, I know the element has the class but when I try to remove it or even check if it has the class using contains, it doesn't work.
const splideList1 = document.querySelectorAll(".splide-one li")
splideList1[0].classList.remove('is-active')
splideList1[0].classList.remove('is-visible')
console.log(splideList1[0].classList)
The image is the result of the console.log
HTML
<ul class="splide__list second-slider">
<li class="splide__slide">
<img class="active-img" src="<?php the_field('imagem_1') ?>" />
</li>
<li class="splide__slide">
<img class="active-img" src="<?php the_field('imagem_2') ?>" />
</li>
<li class="splide__slide">
<img class="active-img" src="<?php the_field('imagem_3') ?>" />
</li>
<li class="splide__slide">
<img class="active-img" src="<?php the_field('imagem_4') ?>" />
</li>
<li class="splide__slide">
<img class="active-img" src="<?php the_field('imagem_5') ?>" />
</li>
<li class="splide__slide">
<img class="active-img" src="<?php the_field('imagem_6') ?>" />
</li>
<li class="splide__slide">
<img class="active-img" src="<?php the_field('imagem_7') ?>" />
</li>
<li class="splide__slide">
<img class="active-img" src="<?php the_field('imagem_8') ?>" />
</li>
</ul>

"splide__slide") and the value in the expanded view (splide__slide is-active is-visible) I would hazard a guess that you're not using dev tools correctly.