Javascript 缺少:在属性id之后

Javascript 缺少:在属性id之后,javascript,jquery,galleria,Javascript,Jquery,Galleria,为什么下面的代码会导致Firebug在$(“#galleria”)行报告错误。galleria({ $('#galleria').galleria({ dataSource: data, width:930, height:575, transition: 'fade', carousel: 'true' , caro

为什么下面的代码会导致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
                        });        

                   });
                }))
               });
              }       
        });

我不是专家,但你是不是在
}
之后遗漏了一个

像这样:

       $(e.imageTarget).css('cursor','pointer').click(this.proxy(function(e) {
               e.preventDefault(); // removes the garbage
               $.fancybox({

                    $('#galleria').galleria({ 
                        width: 500,
                        height: 500
                    });        

               });
            })); //here
在语法上是无效的

$.fancybox({

        $('#galleria').galleria({ 
            width: 500,
            height: 500
        });        

   });