If I want to edit the CSS properties of a DOM element with a specific class using the jQuery search method, does it matter (in performance and browser compatibility) if I use this shortcut:
$(domobject).find(".theclass").css("color","#FFF");
or every function like this:
$(domobject).find(".theclass").each(function() {
$(this).css("color","#FFF");
});
In my case, the dom-object is an element of backbone.js view.el, but of course my question is not limited to backbone.js only.
Thank you for your help!
source
share