$.css() v. style.property

Benchmark created by Doug Avery on


Description

Read more about why I needed/wanted to figure this out on my blooooggggg

Preparation HTML

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

<div id="testme"></div>
<script>
  $testme = $('#testme');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
$.css()
$testme.css('left', 300);
ready
style.property
$testme[0].style.left = '300px';
ready
$.attr()
$testme.attr('style', 'left: 300px;');
ready

Revisions

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