Multiple Child vs Descendant Selector (v33)

Revision 33 of this benchmark created on


Preparation HTML

<div id="content">
  <form method="post" action="/">
    <h2>Traffic Light</h2>
    <ul id="traffic_light">
      <li class="red"><input type="radio" class="on" name="light" value="red" /> Red</li>
      <li class="yellow"><input type="radio" class="off" name="light" value="yellow" /> Yellow</li>
      <li class="green"><input type="radio" class="off" name="light" value="green" /> Green</li>
    </ul>
    <input class="button" id="traffic_button" type="submit" value="Go" />
  </form>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
descendant
$('#content .on');
ready
multiple child
$('#content > form > ul > li > .on');
ready

Revisions

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