2015-02-05 114 views
4

我想要檢測何時貓頭鷹傳送帶已準備好被操縱,以便我可以向其添加內容。下面的腳本啓動輪播,但初始化事件從不觸發。回調事件不起作用 - 使用貓頭鷹傳送帶

<script type="text/javascript"> 
    jQuery(document).ready(function() { 
     var owl = jQuery("#owl-example"); 
     owl.on('initialized.owl.carousel', function(e) { 
       alert('hi'); 
     }).owlCarousel({ 
      navigation: true, 
      goToFirstSpeed: 2000, 
      singleItem: false, 
      transitionStyle: "fade", 
      items:<?=$_productCollection->getPageSize()?>, 
      lazyLoad: true, 
      autoWidth:true, 
      scrollPerPage:true, 
      mouseDrag:false, 
      touchDrag: false, 
      startPosition: "zero", 
      navigationText: [ 
       "<strong>&lt;</strong>", //this equates to "<" 
       "<strong>&gt;</strong>" //this equates to ">" 
      ] 
     }); 
     ; 
    }); 

</script> 

回答

相關問題