jQuery children vs find (v106)

Revision 106 of this benchmark created on


Description

This testcase compares the performance from .children() and .find()

Preparation HTML

<form id="formElem" name="formElem" action="" method="post">
                    <fieldset class="step" data-step='1'>
                        <img src="1.jpg" >
                    </fieldset>
                    <fieldset class="step" data-step='2'>
                        <img src="2.jpg" >
                    </fieldset>
                    <fieldset class="step" data-step='3'>
                        <img src="3.jpg" >
                    </fieldset>
                </form>

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

Test runner

Ready to run.

Testing in
TestOps/sec
direct selected
$(document).find('[data-step="1"]')
ready
find
$('[data-step="1"]')
ready

Revisions

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