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

Revision 4 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

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

Revisions

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