Javascript 回调事件不起作用-使用Owl转盘

Javascript 回调事件不起作用-使用Owl转盘,javascript,jquery,owl-carousel-2,Javascript,Jquery,Owl Carousel 2,我试图检测猫头鹰转盘何时准备好被操纵,以便我可以向其添加内容。下面的脚本启动旋转木马,但初始化的事件从未触发 <script type="text/javascript"> jQuery(document).ready(function () { var owl = jQuery("#owl-example"); owl.on('initialized.owl.carousel', function(e) { al

我试图检测猫头鹰转盘何时准备好被操纵,以便我可以向其添加内容。下面的脚本启动旋转木马,但初始化的事件从未触发

<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>

jQuery(文档).ready(函数(){
var owl=jQuery(“owl示例”);
on('initialized.owl.carousel',函数(e){
警报(“hi”);
}).owlCarousel({
导航:对,
goToFirstSpeed:2000,
singleItem:false,
过渡风格:“褪色”,
项目:,
懒汉:没错,
自动宽度:正确,
是的,
mouseDrag:错,
触摸拖动:错误,
起始位置:“零”,
导航文本:[
“”,//这等于”
] 
});
;
});

初始化.owl.carousel初始化.owl.carousel事件必须在owl carousel初始化之前附加


检查文档的此链接

您需要升级到新版本


请确定更改并通知询问此问题的用户