jquery css selector test

JavaScript performance comparison

Test case created

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div class="class1">
<span class="class2">test</span>
</div>

Preparation code output

test

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
no context
$("div.class1 span").html();
pending…
with context
$("span", "div.class1").html();
pending…
single class
$(".class2").html()
pending…
extra class
$(".class1 .class2").html()
pending…
with find()
$("div.class1").find("span").html();
pending…

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

Compare results of other browsers

0 comments

Add a comment