jquery css() versus simple javascript style change (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js">
</script>
<div id="bP4" style="left:10px; top:10px;">
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
css()
$("#bP4").css({
  "height": "20px",
  "lineHeight": "40px"
});
ready
ordinary js
obj = document.getElementById('bP4');
obj.style.height = "20px";
obj.style.lineHeight = "40px";
ready

Revisions

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