jQuery show/hide vs css("display","none/block") (v17)

Revision 17 of this benchmark created by Dan on


Preparation HTML

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

<div id="remove"></div>

<script type = "text/javascript">
var jQelem = $("#remove");
var jsElem = document.getElementById("remove");
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
show/hide
jQelem.show();
jQelem.hide();
ready
css
jQelem.css("display", "block");
jQelem.css("display", "none");
ready
style
jsElem .style.display = "block";
jsElem .style.display = "none";
ready

Revisions

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