0

В самом начале скрипта везде кроме хрома натыкается на ошибку:

illegal character

(function($){

Вот целиком:

(function($) {
    var defParams = {
        speed: 400,
        step: 98
    };
    var options;

    $.fn.simpleGallery = function(imgSelector, params) {
        options = $.extend({}, defParams, options, params);

        this.wrap('<div class="gallery-previews"><div class="list-wrap"></div></div>');
        var $list = this,
            $listWrap = this.parents('.list-wrap'),
            $previews = this.parents('.gallery-previews'),
            $imgLinks = this.find('a');
        $previews.append('<div class="scroll-top"></div><div class="scroll-btm"></div>');
        var $scrollTop = $previews.find('.scroll-top'),
            $scrollBtm = $previews.find('.scroll-btm');
        $scrollTop.addClass('disabled');

        var listWrapHeight = $listWrap.height();

        if ($listWrap.height() >= $list.height()) {
            $scrollTop.addClass('disabled');
            $scrollBtm.addClass('disabled');
        } else {
            $scrollTop.bind('click', function() {
                var listTop = parseInt($list.css('top'));
                $scrollTop.addClass('disabled');
                if (listTop < 0) {
                    $scrollBtm.removeClass('disabled');
                    $list.animate({
                        'top': listTop + options.step
                    }, options.speed, function() {
                        if (listTop + options.step < 0) $scrollTop.removeClass('disabled');
                    });
                } else {
                    $scrollTop.addClass('disabled');
                }
            });
            $scrollBtm.bind('click', function() {
                var listTop = parseInt($list.css('top'));
                $scrollBtm.addClass('disabled');
                if (listWrapHeight - listTop <= $list.height()) {
                    $scrollTop.removeClass('disabled');
                    $list.animate({
                        'top': listTop - options.step
                    }, options.speed, function() {
                        if (listWrapHeight - listTop <= $list.height() - options.step) $scrollBtm.removeClass('disabled');
                    });
                } else {
                    $scrollBtm.addClass('disabled');
                }
            });
        }

        $imgLinks.bind('click', function() {
            $(imgSelector).html('<a href="#actgal" id="doit"><img src="' + $(this).attr('href') + '" style="height: 350px;"/></a>');
            $('#doit').click(function() {
                $('.actgal').triggerHandler('click');
                return false;
            });
            $('.jcarousel-skin-tango a').click(function() {
                $('.ttt a').removeClass('actgal');
                var rell = $(this).attr('rel');
                $('#' + rell).addClass('actgal');
            });
            $('a[rel=gal1]').fancybox({
                'titleShow': false,
                'transitionIn': 'none',
                'overlayColor': '#685450',
                'changeFade': 'slow',
                'transitionOut': 'none',
                'padding': '1',
                'cyclic': true,
                'opacity': true,
                'showNavArrows': true,
                'showCloseButton': false
            });

            return false;
        });

        return this;
    };
})(jQuery)

1 ответ 1

2

Потому что не

function($){

а

function($){

:)

Ваш ответ

Нажимая на кнопку «Отправить ответ», вы соглашаетесь с нашими условиями использования и подтверждаете, что прочитали и поняли наши политику конфиденциальности и нормы поведения.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.