===========================
Tiny Javascript Pollyfill to simulate CSS scroll Snap Points in non-supporting browsers.
You can also run the script manually. Usefull when you dynamically inject nodes into your document.
// your DOM injecton here
// then:
znapscroll.prepare();
Since you might want to remove elements from the DOM, we need to make sure memory is not leaked.
// your DOM removal here
// then:
znapscroll.destroy();
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') );