> The problem was that in my situation '#divMain img' sometimes already
> contains '#newImg', and when it does the add function would add a
> second copy of it, which messed things up further down the line.

That actually sounds like a bug. What version of jQuery are you using?
AFAICT, jQuery().add() is supposed to use jQuery.merge to avoid
duplicates. Can you create a test case and post a bug report?

Reply via email to