jQuery: css-display:none vs. hide (v4)

Revision 4 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="hide-me">hide me</div>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery hide()
$("#hide-me").hide();
$("#hide-me").show();
ready
Native Style
document.getElementById("hide-me").style.display = "none";
document.getElementById("hide-me").style.display = "block";
ready

Revisions

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