selector test id/id id/id class (v7)

Revision 7 of this benchmark created on


Preparation HTML

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


<div id="Mytbl">
<div id="MyElement"></div>
<div class="MyClass"></div>
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
Direct ID
$('#MyElement');


 
ready
Nested ID's
$('#Mytbl #MyElement')
ready
ID - Class
$('#Mytbl .MyClass')
ready
Class, ID
$('.MyClass','#Mytbl')
ready
Id Find Class
$('#Mytbl').find('.MyClass')
ready
Document get element by id
document.getElementById('MyElement')
ready
Jquery with documet.getElementById
$(document.getElementById('MyElement'))
ready

Revisions

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