[jQuery] Creating multiple elements with different containers?

[jQuery] Creating multiple elements with different containers?


I have a slight problem with one of my plugins. I'm taking a table, and
parsing it to create divs containing the header/footer and fixed
columns. These are all put into a containing DIV and then the
containing DIV "wraps" the table. (that's the end result, not the actual
process...). Now it turns out I need to do this to a second table on
the same page.
The problem is that I'm making references to the various divs by class
name. So when I create the second instance, the first gets modified. I
suspect I need to apply a context element in here
(i.e. $(".myclass", container); ). But thought I'd check here first to
see how others are handling this type of thing. Would I need to create
a "container" object in my plugin? Something like
var container = $(this).parent();
??
Are there better options?
Sorry if this is kinda vague - I don't have the code in front of me at
the moment....
Shawn