- Overview
- Documents
Scrollify is a jQuery plugin that assists scrolling and smoothly snaps to sections. Fully configurable and optimised for touch.
Source: projects.lukehaas.me
Jun 09, 2014 in Scroll 5377 views
Scrollify is a jQuery plugin that assists scrolling and smoothly snaps to sections. Fully configurable and optimised for touch.
Source: projects.lukehaas.me
1. INCLUDE JS FILES
<script src="script/jquery-1.6.js"></script> <script src="script/jquery.easing.1.3.js"></script> <script src="script/scrollify.min.js"></script>
2. HTML
<section></section> <section></section>
3. JAVASCRIPT
$(function() { $.scrollify({ section : "section", }); });
4. OPTIONS
section: A selector for the sections.
sectionName: Scrollify lets you define a hash value for each section. This makes it possible to permalink to particular sections. This is set as a data attribute on the sections. The name of the data attribute is defined by sectionName.
easing: Define the easing method.
offset: A distance in pixels to offset each sections position by.
scrollbars: A boolean to define whether scroll bars are visible or not.
before: A callback that is called before a section is scrolled to via the move method. Arguments include the index of the section and an array of all section elements.
after: A callback that is called after a new section is scrolled to. Arguments include the index of the section and an array of all section elements.
5. OPTIONS
The move method can be used to scroll to a particular section. This can take the index of the section, or the name of the section preceded by a hash.
$.scrollify("move","#name");
Tagged with:
scrollify
scroll wheel
steering
jquery plugin
scrolling
smoothly snaps
sections
touch
scroll
Related Articles