3 ms·
In most other languages, the second form makes more sense. But jQuery is doing things under the surface that make the syntax change inconsequential. In my per
by eamann 14y ago
In most other languages, the second form makes more sense. But jQuery is doing things under the surface that make the syntax change inconsequential.
In my performance tests (Win 8, Chrome 25), the chained method actually performed faster than the object method. So while the idea of passing multiple arguments to a single function call (as opposed to making multiple function calls) might make sense for a general programming best practice, when applied to jQuery it fails.