javascript - Check if hasClass and show div -


i have slider , everytime 1 div on focus added class swiper-slide-visible. i'm trying show div depending on item on focus. problem jquery doesnt check when rotate , if use while browser stop work.

 <div class="swiper-slide pag1"> <h1>a</h1> </div>  <div class="swiper-slide pag2"> <h1>b</h1> </div>  <div class="swiper-slide pag3"> <h1>c</h1> </div> 

 <div class="conteudo">   <p class="diva">conteudo div a</p>   <p class="divb">conteudo div b</p>   <p class="divc">conteudo div c</p>  </div> 

 if ($(".pag1").hasclass("swiper-slide-visible")) {   $(".diva").show(); } if ($(".pag2").hasclass("swiper-slide-visible")) {   $(".divb").show(); } if ($(".pag3").hasclass("swiper-slide-visible")) {   $(".divc").show(); } 


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -