Skip to content
CSS scroll Snap Points Polyfill
Branch: master
Clone or download
Sergi Meseguer Sergi Meseguer
Sergi Meseguer and Sergi Meseguer updated demo
Latest commit 0fe79b8 Nov 23, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
imgs initial draft, v.0.1.0 Jul 25, 2015
.editorconfig initial draft, v.0.1.0 Jul 25, 2015
css-scroll-snap-points.css fix Firefox bug with scroll-snap-points-y 100% Jul 27, 2015
index.html initial draft, v.0.1.0 Jul 25, 2015 updated demo Nov 23, 2015

scroll Snap Points Polyfill


Tiny Javascript Pollyfill to simulate CSS scroll Snap Points in non-supporting browsers.


  1. Include the script at the end of your HTML, it will autorun when DOM is ready.
  2. Enjoy.


Run after DOM injection

You can also run the script manually. Usefull when you dynamically inject nodes into your document.

// your DOM injecton here
// then:

Destroy after DOM removal

Since you might want to remove elements from the DOM, we need to make sure memory is not leaked.

// your DOM removal here
// then:

Destroy limiting by context

destroy method accepts a context argument, to limit destruction to an HTML element:

// your DOM removal here
// then (limited to children of element with id=g1):
znapscroll.destroy( document.getElementById('g1') );


See full working demo

You can’t perform that action at this time.