show vs addclass (v17)

Revision 17 of this benchmark created on


Preparation HTML

<script src="https://code.jquery.com/jquery-3.0.0-beta1.min.js"></script>
<style type="text/css">
  .displayClass { display: block; }
</style>
<div id="test" style="display: none;">Hi</div>
<script>
  var elem = document.getElementById("test");
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
.show()
$(elem).show();
ready
.addClass()
$(elem).addClass("displayClass");
ready

Revisions

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