Support Circular Carousels
| Project: | jCarousel |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Attached patch adds support for circular carousels. Rather than scrolling back from the end to the beginning over all items in between, this will make it look as if all items are in a circle. Based off the example at http://sorgalla.com/projects/jcarousel/examples/special_circular.html .
Basic workings:
- If "wrap" option is set to "circular", all items in the carousel are stored in a list.
- The items are removed from the HTML (without this, an auto carousel would not wrap but just stop at the end)
- The itemVisibleInCallback and itemVisibleOutCallback are implemented as in the example: items are added/removed as they slide in or out of the visible area.
Patch is against current CVS 6.x-dev branch.
Tested with an auto-scrolling horizontal carousel (in combination with a slightly modified Views Carousel module). Not tested with the usage of previous/next buttons, but given the jCarousel example I assume this should work.
| Attachment | Size |
|---|---|
| jcarousel.js.circular.patch | 1.36 KB |

#1
How did you modify the Views Carousel module? Do I need to patch that as well to use this? Thanks for doing it.
#2
Wow, nicely done. Also put a demonstration of it on the help page. Committed. Regarding Views Carousel, the option at #332358: Allow Circular Wrap was added.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.