Select all but first

Benchmark created on


Preparation HTML

<script src="//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

Revisions

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