jquery: css("height") vs. .height() (v2)

Revision 2 of this benchmark created by Matthias Krumm on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="foo">Hello</div>

Test runner

Ready to run.

Testing in
TestOps/sec
css("height")
$("#foo").css("height", "200px");
ready
.height() 1
$("#foo").height("200px");
ready
.height() 2
$("#foo").height(200);
ready

Revisions

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

  • Revision 2: published by Matthias Krumm on