# Summary

This module allows developers and themers to make use of the jCarousel jQuery plugin. It includes a developer API that other modules can use, as well as Views integration in the 2.0 version so that you can turn any list of content or images into a carousel.

# Project URL

https://www.drupal.org/project/jcarousel

# Where is the code?

https://github.com/onatalushko/jcaurucel

# Estimated completion date

Unknown

# Dependencies

Unknown

# Who's doing the port?

https://www.drupal.org/u/niko

# What help do they need?

Unknown

# D8 roadmap

https://www.drupal.org/node/2600540

# Background and reference information

Unknown

Comments

legaudinier created an issue. See original summary.

legaudinier’s picture

Issue summary: View changes
niko-’s picture

Issue summary: View changes
mediapal’s picture

Generally it's working with 8.1.1

On Firefox 46.0.1 Yosemite and Firefox 22.0 Windows 7 the script doesn't fire and I got this error:

Error: ReferenceError: event is not defined
Source: http://localhost/dev/modules/jcaurucel/assets/vendor/jcarousel/jcarousel...
Line: 87

Also the slider isn't swipe responsive at least not on my iPad.

igel’s picture

@mediapal
I'm using it as well and experience the same issues under Firefox.

To make the Carousel swipeable I use the following:

1. Add swipe library to theme:

2. Use click functions (for the lack of better documentation):

            var jcarousel = $('.jcarousel-wrapper');
            jcarousel.on('swipeleft', function(){
                $(this).find('.jcarousel-control-next').click();
            });
            jcarousel.on('swiperight', function(){
                $(this).find('.jcarousel-control-prev').click();
            });
            // If the movestart is heading off in an upwards or downwards direction, prevent it so that the browser scrolls normally.
            jcarousel.on('movestart', function(e) {
              if ((e.distX > e.distY && e.distX < -e.distY) ||
                  (e.distX < e.distY && e.distX > -e.distY)) {
                e.preventDefault();
              }
            });

I think both, a touchmove library dependency and extended documentation, should be added for a first alpha version of the module. We could improve the touch device UX by adding a touch move function and move the slides with position relative and left/right properties accordingly.

niko-’s picture

Status: Needs work » Fixed

8.x-4.0 released
@mediapal - bug was fixed in realease.
@igel - your feature request was moved to seperate issue https://www.drupal.org/node/2869328 - welcome for patches

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.