Here is what I am currently seeing as the code to enable responsiveness of the carousel.

/**
 * Callback for reponsive views.
 */
Drupal.jcarousel.responsiveCallback = function($carousel) {
  if ($carousel.options.responsive) {
    var width = $carousel.innerWidth();
    $carousel.jcarousel('items').width(width);
  }
}

Code in the example given from the Jcarousel website is this:

.on('jcarousel:reload jcarousel:create', function () {
  var carousel = $(this),
        width = carousel.innerWidth();

  if (width >= 600) {
    width = width / 3;
  } else if (width >= 350) {
    width = width / 2;
  }

  carousel.jcarousel('items').css('width', Math.ceil(width) + 'px');
})

I'm not familiar enough with javascript to figure out how to make this work, but it doesn't seem to be working at all as is. I assume that it's the javascript here that is the problem.

Comments

deggertsen created an issue.

deggertsen’s picture

Seeing this error in the chrome dev console.

Uncaught TypeError: Cannot read property 'responsive' of undefined

It's referencing line 160 of jcarousel.js