【问题标题】:missing : after property id缺失:在属性 ID 之后
【发布时间】:2011-06-03 15:30:10
【问题描述】:

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

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

【问题讨论】:

    标签: javascript jquery galleria


    【解决方案1】:
    $.fancybox({
    
            $('#galleria').galleria({ 
                width: 500,
                height: 500
            });        
    
       });
    

    在语法上无效。

    【讨论】:

      【解决方案2】:

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

      像这样:

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

      【讨论】:

        猜你喜欢
        • 2010-11-28
        • 1970-01-01
        • 1970-01-01
        • 2011-04-13
        • 1970-01-01
        • 2011-10-07
        • 1970-01-01
        • 2011-05-08
        • 1970-01-01
        相关资源
        最近更新 更多