eq function to eq selector jquery

Benchmark created by Tomás Corral on


Preparation HTML

<ul id="list">
  <li>
    a
  </li>
  <li>
    b
  </li>
  <li>
    c
  </li>
  <li>
    d
  </li>
  <li>
    e
  </li>
  <li>
    f
  </li>
</ul>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
eq function
$(document.getElementById("list")).find("li").eq(4)
ready
eq selector
$(document.getElementById("list")).find("li:eq(4)")
ready

Revisions

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

  • Revision 1: published by Tomás Corral on