Thanks Richard.
I had the opportunity to look at the code, and I have a bit of work
ahead of me. Turns out the plugin is using IDs rather than classes. So
If I'm going to have more than one on a page, the IDs need to go...
But, the same core problem still exists regardless. Time to hunker down
and getterdone...
Shawn
Richard D. Worth wrote:
On Tue, Mar 4, 2008 at 3:24 AM, Shawn <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
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();
That looks like a fine way to go. Another option (though perhaps not any
better) would be to give that container an id, and do your selectors like:
$("#container1 .myclass")
- Richard
Richard D. Worth
http://rdworth.org/