Hi everyone,
I was wondering which was the fastest way to apply a class on body and, let's say, all paragraphs. We can use simple selectors such as:
$("body").addClass("foo");
$("p").addClass("bar");
But also traversing methods like:
$("body").addClass("foo").find("p").addClass("bar");
Is there any difference in term of performance?
Cheers, Benjamin