@gretyl007

Как исправить ошибку SCRIPT5007: Unable to get property 'attr' of undefined or null reference?

Добрый день. Использую на сайте карусель с таким скриптом:
jQuery(document).ready(function (jQuery) {
          var carousel = jQuery("#carousel").waterwheelCarousel({
            flankingItems: 2,
            separation: 250,
            separationMultiplier: 0.7,
            autoPlay: 3000,
            movingToCenter: function (item) {
              jQuery('#callback-output').prepend('movingToCenter: ' + item.attr('id') + '<br/>');
            },
            movedToCenter: function (item) {
              jQuery('#callback-output').prepend('movedToCenter: ' + item.attr('id') + '<br/>');
            },
            movingFromCenter: function (item) {
              jQuery('#callback-output').prepend('movingFromCenter: ' + item.attr('id') + '<br/>');
            },
            movedFromCenter: function (item) {
              jQuery('#callback-output').prepend('movedFromCenter: ' + item.attr('id') + '<br/>');
            },
            clickedCenter: function (item) {
              jQuery('#callback-output').prepend('clickedCenter: ' + item.attr('id') + '<br/>');
            }
          });

          jQuery('#prev').bind('click', function () {
            carousel.prev();
            return false
          });

          jQuery('#next').bind('click', function () {
            carousel.next();
            return false;
          });

          jQuery('#reload').bind('click', function () {
            newOptions = eval("(" + jQuery('#newoptions').val() + ")");
            carousel.reload(newOptions);
            return false;
          });
      });


Но в edge выдает ошибку и карусель не работает. Как её можно исправить?
  • Вопрос задан
  • 596 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы