Patch attached.

CommentFileSizeAuthor
#1 jcarousel-zebra.patch1.16 KBquicksketch
jcarousel-zebra.patch618 bytesmstrelan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Active » Fixed
FileSize
1.16 KB

Thanks, this is a good suggestion. I've revised your patch because I encountered a few problems with the approach:

- Our existing JS doesn't properly parse out the item number after appending " even" or " odd" to the class name. This isn't a problem with your patch but a problem with the JS. After applying your patch it made the problem apparent when using an AJAX-enabled carousel.
- This approach used $id to determine even/odd zebra striping, but $id always starts at 0. If you had a carousel with an odd number of items, you'd end up with two items with the "odd" class next to each other between pages.

This patch fixes both problems and I've committed it to both 2.x branches.

Status: Fixed » Closed (fixed)

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