http://jsperf.com/selector-vs-find-again
selector is faster
(NOTE: made up random html just so it wasn’t just those elements on the page)
More Related Contents:
- Selecting and manipulating CSS pseudo-elements such as ::before and ::after using javascript (or jQuery)
- Should all jquery events be bound to $(document)?
- Get selected text from a drop-down list (select box) using jQuery
- jQuery selector regular expressions
- Assign click handlers in for loop
- How can I select an element by name with jQuery?
- jQuery selector for inputs with square brackets in the name attribute
- jQuery selectors on custom data attributes using HTML5
- How can I get selector from jQuery object
- Select all elements that have a specific CSS, using jQuery
- jQuery function to get all unique elements from an array?
- Testing if a checkbox is checked with jQuery
- JQuery .on() method with multiple event handlers to one selector
- jQuery : select all element with custom attribute [duplicate]
- Selecting multiple classes with jQuery
- Case insensitive jQuery attribute selector
- Not class selector in jQuery
- jQuery Selector + SVG Incompatible?
- Using jQuery to search a string of HTML
- Store jquery selector in variable
- jQuery: Check if div with certain class name exists
- Is there a ‘has focus’ in JavaScript (or jQuery)?
- jQuery :contains(), but to match an exact string
- Getting a jQuery selector for an element
- In jQuery, is selecting by class or id faster than selecting by some other attribute?
- Getting the “match” object in a Custom Filter Selector in jQuery 1.8
- Combine two selectors with one jQuery object
- What is the new proper way to use a child selector with a context node in jQuery?
- jQuery: Select data attributes that aren’t empty?
- Why do functional pseudos such as :not() and :has() allow quoted arguments?