Test name | Executions per second |
---|---|
Context Selector | 1162445.9 Ops/sec |
Find | 1367354.6 Ops/sec |
Name Selector | 75255.7 Ops/sec |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<div id="#test-root"><div name="test-child"></div></div>
jQuery('[name=test-child]', '#test-root').css('border', '1px solid red');
jQuery('#test-root').find('[name=test-child]').css('border', '1px solid red');
jQuery('[name=test-child]').css('border', '1px solid red');
jQuery('[name=test-child]', jQuery('#test-root')).css('border', '1px solid red');