Cross-Browser JavaScript problem (Gecko vs. Webkit)

So, I’m building a web page that will display multiple carousels of products based on the contents of a JSON object. The JavaScript is structured in such a way that, upon complete loading of the DOM, it iterates through arrays of my products and builds the initial set of items that will be displayed within the carousels. This work just fine in Firefox and IE. The only problem is that Webkit browsers–namely, Chrome and Safari–are initializing all carousels to display only the information from the very last array of products. So, Firefox and IE initialize the page thus:

Carousel 1
A,A,A,A

Carousel 2
B,B,B,B

Carousel 3
C,C,C,C

Carousel 4
D,D,D,D

Carousel 5
E,E,E,E

. . . whereas Chrome and Safari initialize the page in this fashion:

Carousel 1
E,E,E,E

Carousel 2
E,E,E,E

Carousel 3
E,E,E,E

Carousel 4
E,E,E,E

Carousel 5
E,E,E,E

Does anyone know what could be causing this?

We might be able to work it out, if we were able to play around with a test page that demonstrates the problem.

If you can’t provide a link to a test page then providing a copy of the code would be the next best alternative.