fadeto vs animate opacity (v2)

Revision 2 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
fadeTo

var html = '<div id="tofade" style="opacity:0">This needs to be faded in and out</div>'; 
$('body').append(html);
$('#tofade').fadeTo(0, 1500);
ready
animate
var html = '<div id="toanim" style="opacity:0">This needs to be faded in and out</div>'; 
$('body').append(html);
$('#toanim').animate({
'opacity' : '0'
}, 1500)
ready

Revisions

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