closest vs parents
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<p>
<div>
<form id="form4">
<input id="test4">
</form>
<span>
</span>
<div>
<form id="form1">
<input id="test1" data-args='{"test1":0}'>
</form>
<form id="form2">
<input id="test2">
</form>
<form id="form3">
<input id="test3">
</form>
</div>
</div>
</p>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
parents |
|
pending… |
closest |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by X
- Revision 2: published
- Revision 3: published
- Revision 4: published by Anup
- Revision 5: published by Anup
- Revision 6: published
- Revision 7: published by Anup
- Revision 8: published by Anup
- Revision 9: published by Anup
0 comments