Karl:

Thanks again. One last bug in the code you posted above, in the $
('div.flag').each function, the assignment:

var $this = $(this);

Needs to take place before the if-else statements.

Overall, you improved code runs in approximately 1 second...down from
4 seconds for my original code. Wow!

FYI -- according to Firebug, chaining the before and after doesn't
seem to make any real difference in performance.

Out of curiosity, you wrote your for loops differently than I did, for
example:

Me: for (z=0;z<comments[i].length;z++)

You: for (var z=0, c=comments[i].length;z<c;z++)

Is there a difference?

Thanks again,
CJL

Reply via email to