Skip to content

RBV1/paroller.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

paroller.js

A lightweight jQuery plugin that enables parallax scrolling effect.

  • You can use it on elements with background property or on any other element
  • While scrolling elements can move: vertical, horizontal
  • Manipulated through html data-* attributes
  • Mobile ready
  • Easy to use

DEMO: example page

Install

Before closing element include:

  1. jQuery
  2. jquery.paroller.js

Bower

$ bower install paroller.js

Run

$("body").paroller();

Usage

data attribute

To enable Paroller on element you have to add data-paroller-factor to selected element. data-paroller-factor sets speed and distance of element's parallax effect on scroll.

data-* value default value
data-paroller-factor invokes jquery.paroller.js functionality. It sets elements offset and speed. It can be positive (0.3) or negative (-0.3). Less means slower. 0
data-paroller-type background, foreground background
data-paroller-direction vertical, horizontal vertical

JavaScript

$("element").paroller();
$(window).paroller({ factor: '0.5', type: 'foreground', direction: 'horizontal' });

Todos

  • direction: diagonal

License

MIT

About

Parallax scrolling jQuery plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 94.4%
  • CSS 5.6%