style versus jquery css (v6)

Revision 6 of this benchmark created on


Preparation HTML

<div id="test" style="width: 400px; height: 200px; background-color: #ccc;"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Jquery css()
$('#test').css({opacity: "", filter: "", display: "block"});
 
ready
Native style
$test = $('#test');
                        
$test[0].style.opacity = "";
$test[0].style.filter = "";
$test[0].style.display = "block";
 
ready

Revisions

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