jquery hide

Benchmark created by Alex Muench on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<h1 id="elem1">Test</h1>
<h1 id="elem2">Test</h1>
<h1 id="elem3">Test</h1>
<h1 id="elem4">Test</h1>

Test runner

Ready to run.

Testing in
TestOps/sec
using-helper
var hideElem = function($elem){
    $elem.hide();
}

hideElem($('#elem1'));
hideElem($('#elem2'));
hideElem($('#elem3'));
hideElem($('#elem4'));
ready
no-helper
$('#elem1').hide();
$('#elem2').hide();
$('#elem3').hide();
$('#elem4').hide();
ready

Revisions

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

  • Revision 1: published by Alex Muench on