簡體   English   中英

使用Owl Carousel和Wow.js

[英]Using Owl Carousel and Wow.js

貓頭鷹輪播: http: //www.owlcarousel.owlgraphic.com/ Wow.js: http ://mynameismatthieu.com/WOW/

我正在使用Owl Carousel和Wow.js

我正在嘗試創建一個幻燈片放映,其中幻燈片處於活動狀態時,每個幻燈片的內容都具有動畫效果。 當前,所有內容的動畫都會發生,即使其中包含的幻燈片不在屏幕上也是如此。 Wow.js似乎只能識別幻燈片本身是可見的並激活所有動畫

有沒有一種方法可以更改它,以便僅當包含幻燈片的內容在屏幕上可見時,動畫才會出現在內容上?

mwdigian是對的,我接下來有同樣的問題:

<script> 
   var $owl = $('.test-carousel'); 
   $owl.owlCarousel(); 

   //here we need hide because method show() doesn't work with css visible
   $( ".active .item h2" ).hide();

   //all other is the same
   $owl.on('translated.owl.carousel',
      function( event ) { 
      $( ".active .item h2" ).addClass( "animated bounceInDown" ); 
      $(".active .item h2").show(); });
   </script>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM