отсутствует: после идентификатора свойства - PullRequest
0 голосов
/ 03 июня 2011

Почему следующий код заставляет 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
                        });        

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

Ответы [ 2 ]

2 голосов
/ 03 июня 2011
$.fancybox({

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

   });

является синтаксически недействительным.

0 голосов
/ 03 июня 2011

Я не эксперт, но вам не хватает ; после }))?

Как это:

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

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

               });
            })); //here
...