I am trying to make a feature on a swiper slide so when the second slide on the slider has the class name "swiper-slide-active" it alerts the user they are on the second slide
Here is the codepen to my problem https://codepen.io/mrsalami/pen/rEWNzN
$(document).ready(function() {
if ($("div.swiper-wrapper > div.swiper-slide.first-child").hasClass("landscape")) {
$(".swiper-wrapper").addClass('landscape-slider');
}
if( $('div.swiper-wrapper > div.swiper-slide.second-child').hasClass('swiper-slide-active')) {
alert('active');
}
});