GSAP scrollto VS jQuery scrolltop

Benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.8/TweenMax.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.8/plugins/ScrollToPlugin.min.js"></script>

Setup

var htmlbody = $('html,body');

Test runner

Ready to run.

Testing in
TestOps/sec
GSAP
TweenLite.to(window, 0.5, {scrollTo:{y:0}, ease:Linear.easeNone});
ready
jQuery
htmlbody.animate({scrollTop: 0}, 500,"linear");
ready

Revisions

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