Hello.. thanks for this plugin, i've been using this in my project.
I do have trouble to do .getElementsBy, which is inside the active slide on the swiper container. Have tried many options but the return always value from the last or the first slide. One of the code i've tested
swiper.on('slideChangeEnd', function () {
var swTest = document.getElementsByClassName("swiper-slide-active");
if (swTest = 'swiper-slide-active'){
var swName = document.getElementById("name").textContent;
console.log (swName);
}
});
Anyone can help me on this ? Thanks
solution : var swTest = document.querySelector('.swiper-slide-active h1').innerHTML;
Hello.. thanks for this plugin, i've been using this in my project.
I do have trouble to do .getElementsBy, which is inside the active slide on the swiper container. Have tried many options but the return always value from the last or the first slide. One of the code i've tested
Anyone can help me on this ? Thanks
solution : var swTest = document.querySelector('.swiper-slide-active h1').innerHTML;