rafscroll – chain your scroll events to requestAnimationFrame

new rafscroll(function() {
  // Do your thing here.
});

Your monitor refreshes at 60 frames per second (fps). Scroll events, on the other hand, do not. Chaining your scroll events to a requestAnimationFrame ensures that your transitions and animations will refresh each time the monitor refreshes, rather than each time a scroll event is fired.

rafscroll – chain your scroll events to requestAnimationFrame

Not too sure how this works? Leaner, Meaner, Faster Animations with requestAnimationFrame is a great article on this subject.

Published by Bramus!

Bramus is a Freelance Web Developer from Belgium. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.