jquery selector context as element

Benchmark created by 11lein on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div id="a">
  <p class="p_class">
  </p>
</div>

Setup

var a_div = $('#a')[0];

Test runner

Ready to run.

Testing in
TestOps/sec
with context
$('.p_class', a_div)
ready
find
$(a_div).find('.p_class')
ready
with Tag in context
$(a_div).find('p.p_class')
ready
with id selector
$('#a .p_class')
ready
with id jQobj selector
$('p.p_class', $('#a'))
ready

Revisions

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

  • Revision 1: published by 11lein on