I have a jQuery script that creates a carousel to rotate images left and right on user click. At first, I wasnt planning on putting more than one carousel on a single page, but
Inside of an event handler, the variable:
$(this)
will get you the calling element. From there, to get the containing div you can use the parent() function:
$(this).parent()
Use that to walk through the DOM.