label test (v3)

Revision 3 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
Hussein
var $cdiv = $('#container').find('div');
$cdiv.hide();
var i = 0;
$('button').click(function() {
 $cdiv.hide();
 $cdiv.eq(i).show();
 i++;
})
ready
test2
$('.change').click(function() {
 $this = $(this)
 $(this).parent("div").hide().next("div").show().append($this);
});
$('#container').children().hide();
$($('#container').children()[0]).show();
ready

Revisions

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