Open jokeyrhyme opened 10 years ago
http://api.jquery.com/category/selectors/jquery-selector-extensions/
To achieve the best performance when using these selectors, first select some elements using a pure CSS selector, then use
.filter()
.
It would make sense to throw a "PERFORMANCE" reason in this and related errors.
E.g.
$('.class:checkbox');
is much better expressed as$('.class').filter(':checkbox');
as this allows as much of the query as possible to be executed by browser-native functionality.