Hide with and without jQuery

Benchmark created by Taylor Lovett on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div>
  <div id="element">My Element</div>

</div>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery
jQuery( '#element' ).hide();
ready
Non-jQuery
document.getElementById( 'element' ).style.display = 'none';
ready

Revisions

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

  • Revision 1: published by Taylor Lovett on
  • Revision 2: published by Camwyn on
  • Revision 4: published by Vadim on