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

Revision 18 of this benchmark created 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", "");
jQelem.css("display", "none");
ready
style
jsElem .style.display = "";
jsElem .style.display = "none";
ready

Revisions

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