3 ms·
It seems to be giving advice which is contrary to the very purpose of jQuery. Take: http://learn.jquery.com/performance/append-outside-loop/ http://learn.jquer
by mattmanser 14y ago
It seems to be giving advice which is contrary to the very purpose of jQuery. Take:
http://learn.jquery.com/performance/append-outside-loop/ http://learn.jquery.com/performance/append-outside-loop/
I always do something like this:
$target
.append($("li")
.class("thing")
.text(someText));
But it's not mentioned at all.
Instead they are using the verbose monstrosities from the DOM API which is exactly what we don't want to use because it sucks.
i.dontWantToHaveVerboseMethodsToAppendSomethingToTheDom(please).
Without the easy DOM manipulation, jQuery's not much more than a nice wrapper to deal with AJAX browser differences. There's some serious cognitive dissonance here.