3 ms·
It creates just one jQuery object to wrap the entire array of DOM nodes. Afterwards, .html() is essentially innerHTML [1], provided jQuery can use it directly (
by Xion 14y ago
It creates just one jQuery object to wrap the entire array of DOM nodes. Afterwards, .html() is essentially innerHTML [1], provided jQuery can use it directly (otherwise it has to create DOM nodes by itself).
[1] https://github.com/jquery/jquery/blob/master/src/manipulation.js#L219 https://github.com/jquery/jquery/blob/master/src/manipulatio...