Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.
/ jetpack.js Public archive

A simple vanilla JavaScript library that makes scrolling look outrageously good.

License

Notifications You must be signed in to change notification settings

f1yn/jetpack.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jetpack.js

dependencies Status

A simple vanilla JavaScript library that makes scrolling look outrageously good. A live demo of jetpack.js (alongside automenu) can be found at flynnbuckingham.com/projects/automenu-jetpack.

How to use

Include either jetpack.js or jetpack.min.js to your document header, and simply add the following lines after your document has loaded:

var jet = new jetpack({options});
jet.hookAnchors();

Options

The jetpack factory function has a single parameter, that uses the following options

options = {
    callback: Function,  // executes a function after object is successfully initialized. This does nothing by default.
    duration: 'fast' || 'slow' || 'medium' || Number || 900, // the duration of each page animation. This is 900ms by default.
    updateURL: true || false, // [false by default] enables automatic URL updating when page animation's are finished. Enabled by default.
    animation:  true || false // [true by default] enables or disables page animation.
}

Building from source

To build this project from source, install dependencies with npm install and run the builder with gulp build. If successful, build files will populate the dist/ directory. This module works best as being required in a bundling software.

About

A simple vanilla JavaScript library that makes scrolling look outrageously good.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published