jQuery parent/child selectors (v51)

Revision 51 of this benchmark created on


Description

The different ways to select (context, pure selector, +find()) DOM elements using jQuery in parent/child scenarios.

Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div class="a" id="a">
  <div class="b" id="b">
     <div class="c" id="c"></div>
  </div>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
.a .c
var $test = $('.a .c');
ready
#a .c
var $test = $('#a .c');
ready

Revisions

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