-
Notifications
You must be signed in to change notification settings - Fork 0
A JS/JQuery lib that snaps content to elements as you scroll.
License
BrianRollins/snap-points
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Snap-Points.js Copyright 2016 by Brian Rollins (me at brianrollins.com) Requires JQuery (jquery.com) Just add the attribute data-snap="true" to the elements you want the browser to snap to. You can adjust the scroll speed (scrollSpeed) in your code or override it here. If you don't feel like coding it into the HTML, use the snapAll() function and pass a string (or array of strings) in for the element(s) you want affected. Ex: snapAll("p") will add the data-snap="true" attribute to all <p> tags. Ex: snapAll(["h1", "h2", "h3", "h4", "h5", "h6"]) gets all the various header tags.
About
A JS/JQuery lib that snaps content to elements as you scroll.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published