jQuery find child by class (v7)

Revision 7 of this benchmark created on


Description

Compare find by different methods Update to latest build of jQuery 1.7.1

Preparation HTML

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<table id="test">
<tr><td>abc</td><td class="def">def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td>def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td>def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td class="def">def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td class="def">def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td>def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td>def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td class="def">def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td class="def">def</td><td>ghi</td><td>jkl</td></tr>
<tr><td>abc</td><td>def</td><td>ghi</td><td>jkl</td></tr>
</table>

Test runner

Ready to run.

Testing in
TestOps/sec
pure query
$("#test td.def");
ready
find
$("#test").find("td.def");
ready
by context
$("td.def", document.getElementById("test"));
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.