0

How do I select the quantity of visible items on a jCarousel? I'm using this plugin http://sorgalla.com/jcarousel/ with this template http://sorgalla.com/jcarousel/examples/responsive/

By default a maximum of 3 elements appear no matter how much i change the width of the container, I want to show at least 5 elements.

adelriosantiago
  • 7,762
  • 7
  • 38
  • 71

1 Answers1

1

This setting can be found on the the file jcarousel.responsive.js, here is the Responsive Carousel example on GitHub https://github.com/jsor/jcarousel/tree/master/examples/responsive.

The lines

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

determine the quantity of items that will be shown on screens larger than 600 and 350 respectively, to show 4 elements on larger screens and only 3 on smaller screens (mobiles) you can use:

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

Also note that some users seem to change the setting "visible" (Setting number of visible images in jCarousel) this variable seems to make no changes on the responsive example.

Community
  • 1
  • 1
adelriosantiago
  • 7,762
  • 7
  • 38
  • 71