An open API service indexing awesome lists of open source software.

https://github.com/lonalore/parallax_bg

Drupal 8 module - Create a Parallax Background effect on any tagged element
https://github.com/lonalore/parallax_bg

drupal drupal-8 drupal-module parallax parallax-scrolling

Last synced: 6 months ago
JSON representation

Drupal 8 module - Create a Parallax Background effect on any tagged element

Awesome Lists containing this project

README

          

# Parallax Background

> This module is an initial Drupal 8 port of [Parallax Background](https://www.drupal.org/project/parallax_bg) module. See [Issue #2861714](https://www.drupal.org/node/2861714) on drupal.org.

This a simple module that allows to set a vertical [Parallax effect](https://ianlunn.co.uk/plugins/jquery-parallax/) on the background of any element on the DOM.

### Installation

- Download [jquery.parallax](https://ianlunn.co.uk/plugins/jquery-parallax/scripts/jquery.parallax-1.1.3.js) library to **/libraries/jquery.parallax/** folder
- Download [jquery.localScroll](https://github.com/flesler/jquery.localScroll/releases/tag/1.4.0) library and unzip files to **/libraries/jquery.localScroll/** folder
- Download [jquery.scrollTo](https://github.com/flesler/jquery.scrollTo/releases/tag/2.1.2) library and unzip files to **/libraries/jquery.scrollTo/** folder
- Finally, install **parallax_bg** module

**Downloaded libraries should look like this:**

- /libraries/jquery.parallax/jquery.parallax.js
- /libraries/jquery.localScroll/jquery.localScroll.min.js
- /libraries/jquery.scrollTo/jquery.scrollTo.min.js

### Configuration

- Goto **Admin / Structure / Parallax elements**
- Add new element you want to apply the Parallax effect using any valid jQuery selector. The selector should point to the element that holds the background, for example: `#top-content`, `body.one-page #super-banner`

### CSS Note

Depending on the position of your element, you need to apply some top-padding to align the background when entering viewport.