Vanilla Animation vs jQuery (v2)

Revision 2 of this benchmark created on


Description

Code Examples from Vanilla-js.com

Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
Vanilla JS
// async test
var s = document.getElementById('thing').style;
s.opacity = 1;
(function fade() {
  (s.opacity -= .1) < 0 ? s.display = "none" : setTimeout(fade, 40)
})();
ready
jQuery
// async test
$('#thing').fadeOut();
ready

Revisions

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