jQuery nested $(".class") selectors (v12)

Revision 12 of this benchmark created on


Description

Testing whether selecting multiple class names is faster by various methods

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<div class="foo-bar">Yep</div>
<div class="foo bar">Yep</div>
<div class="foo bar one">Yep</div>
<div class="foo bar onw two">Yep</div>

Test runner

Ready to run.

Testing in
TestOps/sec
signal class
$(".foo-bar")
ready
multi class
$(".foo.bar")
ready
3 classes
$(".foo.bar.one")
ready
4 classes
$(".foo.bar.one.two")
ready

Revisions

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