Select all but first (v2)

Revision 2 of this benchmark created by Paul on


Preparation HTML

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

<div class="c1"></div>
 <div class="c1"></div>
 <div class="c1"></div>
 <div class="c1"></div>
 <div class="c1"></div>
 <div class="c1"></div>
 <div class="c1"></div>
 <div class="c1"></div>
 <div class="c1"></div>
 <div class="c1"></div>

Test runner

Ready to run.

Testing in
TestOps/sec
Smart way
$('div.c1:gt(0)').hide ();
 
ready
Other way
$('div.c1').not(':first').hide();
ready
Other way 2
$('div.c1:not(:first)').hide();
ready
New way
$('div.c1').not(':eq(0)').hide();
ready

Revisions

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