From https://github.com/charliegeiger89/Scrolld.js