I’ve been working on a project and found the need for a carousel. After some searching I found a great script called jCarousel Lite. I found a bug with the implementation of jCarousel Lite v1.0.1 and how it uses selectors to get the number of li’s in a carousel. In my implementation I’m using list items within each carousel item. After looking at your code the following would result in jCarousel thinking that it has 3 items in the carousel when really there is only 1.

XHTML

1

2

3

4

5

6

7

8

9

10

<div id="carousel">

<ul>

<li class="carouselItem">

<ul>

<li></li>

<li></li>

</ul>

</li>

</ul>

</div>

The current implementation of jCarousels use of $(‘li’, ul) in the constructor will return all nested li’s regardless of how deeply nested they are in the dom structure. To handle this issue I’ve modified a few lines of code in the constructor to fix this issue. Feel free to apply these changes if you see fit.