4 ms·
5. Use find() rather than context This is not really true. The "context" argument uses find under the covers anyway; the performance benefit is literally the o
by yahelc 15y ago
5. Use find() rather than context
This is not really true. The "context" argument uses find under the covers anyway; the performance benefit is literally the overhead of a function calling another function (which is, compared to DOM operations, miniscule).
The jQuery source code comments say as much:
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)