Performance: Selector or Move?
I was wondering what was the fastest way to apply the class on the body and let's say all paragraphs. We can use simple selectors like:
$("body").addClass("foo");
$("p").addClass("bar");
But also move methods such as:
$("body").addClass("foo").find("p").addClass("bar");
Is there a difference in the deadline?
Cheers, Benjamin
+2
source to share