Giter Site home page Giter Site logo

xerotrinity / paroller.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tgomilar/paroller.js

0.0 0.0 0.0 31 KB

Parallax scrolling jQuery plugin

Home Page: https://tgomilar.github.io/paroller.js/

License: MIT License

CSS 5.65% HTML 94.35%

paroller.js's Introduction

paroller.js

npm

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 </body> element include:

  1. jQuery
  2. jquery.paroller.js

npm

$ npm install paroller.js

Bower

$ bower install paroller.js

Yarn

$ yarn add paroller.js

Run

// initialize paroller.js
$("body").paroller();
<!-- select element -->
<div data-paroller-factor="0.3"></div>

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

// initialize paroller.js
$(window).paroller();
// initialize paroller.js and set attributes for #element
$("#element").paroller({ factor: '0.5', type: 'foreground', direction: 'horizontal' });

Todos

  • direction: diagonal

License

MIT

paroller.js's People

Contributors

tgomilar avatar powerbuoy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.