缺少:在属性id之后

missing : after property id

本文关键字:id 之后 属性 缺少      更新时间:2023-09-26

为什么以下代码会导致Firebug在$('#galleria').galleria({行报告错误?

      $('#galleria').galleria({
              dataSource: data,
              width:930,
              height:575,
              transition: 'fade',
              carousel: 'true' ,
              carouselSpeed: 1200  ,
              showCounter :'false',
              showImagenav : 'false',
              showInfo : 'false',
              imageCrop : 'true',
              maxScaleRatio: 1,

              extend: function() {
                this.bind(Galleria.LOADFINISH, function(e) {
                 $(e.imageTarget).css('cursor','pointer').click(this.proxy(function(e) {
                   e.preventDefault(); // removes the garbage
                   $.fancybox({
                        $('#galleria').galleria({ 
                            width: 500,
                            height: 500
                        });        
                   });
                }))
               });
              }       
        });
$.fancybox({
        $('#galleria').galleria({ 
            width: 500,
            height: 500
        });        
   });

在语法上无效。

我不是专家,但你在}))之后缺少;吗?

像这样:

       $(e.imageTarget).css('cursor','pointer').click(this.proxy(function(e) {
               e.preventDefault(); // removes the garbage
               $.fancybox({
                    $('#galleria').galleria({ 
                        width: 500,
                        height: 500
                    });        
               });
            })); //here