> Should I just use DOM's createElement() and appendChild() directly?
> Or use innerHTML?
> And would it execute <SCRIPT> elements?

Have you tried my 2nd suggestion yet?  I think it would solve the
problem:

$(parent).append(state.html);

> In general, does anybody know why jQuery has that regexp in the
> constructor - I assume there is a good reason why they are doing it.

When you call $(foo) (which turns foo into a jQuery object), jQuery
has to determine whether foo is a DOM element, css/DOM selector, or
HTML.  That regexp is testing for an HTML string.  However, when you
call .append(foo) jQuery knows foo must be an HTML string or DOM
element, so there's much less overhead.

Thanks, now that I've been staring at jQuery's internal DOM
manipulation fn's, I've got some neat changes to make to my
SuperFlyDOM plugin.  Much appreciated.

Charles
doublerebel.com

Reply via email to