xPanel

xPanel is waypoint shortcut used to create paralax effect while scrolling panels.


Project maintained by drygiel Hosted on GitHub Pages — Theme by mattgraham

xPanel.js

xPanel is waypoint shortcut used to create paralax effect while scrolling panels.

Examples

Here are a few examples:

Installation

Usage

The most basic usage looks like this:

$('.container-of-panels').waypoint('xpanel');

It means that xPanel schortcut will be applied to all instances of .container-of-panels class. Element with this class is trated as container for panels so it must contain some child elements to notice any effect.

How it works

It adds additional class 'xpanel' to the container and 'scroll-down' & 'scroll-down' depending on scroll directin at the time. Additionaly depending on your shortcut settings adds classes like 'shadow', 'dim' and 'reverse' too. While scrolling child pannels gets class 'in' when panel is incoming into viewport and 'out' when it's outcoming. Thats all what JS do. Rest of fun is made by CSS.

What you can do

After applying the schortcut you can:

Options

If you to temporary disable shortcut set both opctions whenScrollDown & whenScrollUp to false.