jQuery .css in Safari

Benchmark created on


Preparation HTML

<script type="application/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<div id="the-div"></div>

Setup

var $div = $('#the-div');

Test runner

Ready to run.

Testing in
TestOps/sec
.css - Single Property
$div.css({
    left : '10px'
});
ready
.css - Multiple Properties in Single Call
$div.css({
    left                : '10px',
    top                 : '10px',
    '-webkit-transform' : 'translate(10px, 10px)'
});
ready
.css - Multiple Properties in Multiple Calls
$div.css({
    left : '10px'
}).css({
    top : '10px'
}).css({
    '-webkit-transform' : 'translate(10px, 10px)'
});
ready

Revisions

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