book selector tests

Benchmark created by Rob Larsen on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<section>
<div>
<div>
<div>
<p id="yeah" class="yeah">this</p>
</div>
</div>
</div>
</section>

<section>
<div>
<div>
<div>
<p id="nope" class="nope">this</p>
</div>
</div>
</div>
</section>

Test runner

Ready to run.

Testing in
TestOps/sec
id
$("#yeah")
ready
class
$(".yeah")
ready
multiple elements + id
$("section div div div #yeah")
ready
multiple elements + class
$("section div div div .yeah")
ready
multiple elements + tag
$("section div div div p")
ready
qualified with a class
$("section div div div p.yeah")
ready
qualified with an id
$("section div div div p#yeah")
ready
:not
$("section div div div p:not(.nope)")
ready

Revisions

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

  • Revision 1: published by Rob Larsen on