2 ms·
Querying is only a small part of it, though. jQuery provides result sets as proxies for the actual objects. So this: $(".foo").css("color", "green"); will
by lobster_johnson 14y ago
Querying is only a small part of it, though. jQuery provides result sets as proxies for the actual objects. So this:
$(".foo").css("color", "green");
will actually apply the CSS to all matches. This becomes doubly handy when doing things like attaching event handlers, removing nodes, etc.
Looking at Dart's API, I don't see anything like it; queryAll() returns a List<Element>. In order to act on a collection of elements, you have to use iteration mechanisms such as for loops.
The whole concept behind jQuery's $() is that it's a DSL.