Simple fixed background parallax effect in vanilla js.

Overview

Simple Parallax

Simple fixed background parallax effect in vanilla js.

See demo on Codepen.

JS

Initialise the plugin. The first argument identifies the parrallax class.

The second is the modifier it controls the parallax distance. It is defined as a fraction of the total page height and is used to animate the background image position on scroll.

simpleParallax('para',8);

HTML

<section class="para" id="parallax-1"></section>

CSS

#parallax-1{
    background-image: url('../img/myimage.jpg');
    height: 400px;
    width: 100%;
}
You might also like...

Parallax scrolling jQuery plugin

paroller.js A lightweight jQuery plugin that enables parallax scrolling effect You can use it on elements with background property or on any other ele

Dec 26, 2022

Fully controllable vanilla-js material design ripple effect generator.

Fully controllable vanilla-js material design ripple effect generator. This can be used with any JavaScript framework and/or any CSS framework. Demo I

Dec 16, 2022

A JavaScript plugin for creating a tickerboard effect. Plugin for React or vanilla JS.

ticker-board A JavaScript plugin for creating a tickerboard effect. See the Ticker Board page for more info. Importing it There are basically two ways

Aug 11, 2022

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Jul 19, 2022

The jQuery Plugin for Big Background Video (and Images)

BigVideo.js ####The jQuery Plugin for Big Background Video (and Images) Learn how to use this plugin on its demo page. 12-30-2015 Update This project

Jan 9, 2023

Awesome critique of crypto / web3. Curated list of high quality critique plus background. Seek to be as constructive as possible.

Awesome critique of crypto/web3 Awesome critique of crypto/web3, etc. Contributions are welcome. Critique General Stephen Diehl series - https://www.s

Jan 1, 2023

Easily open daily notes and periodic notes in new pane; customize periodic notes background; quick append new line to daily notes.

Easily open daily notes and periodic notes in new pane; customize periodic notes background; quick append new line to daily notes.

Obsidian daily notes opener This plugin adds a command for opening daily notes in a new pane (so that a keyboard shortcut could be used!) and gives ex

Dec 26, 2022

🌎 Set the latest image from GOES 16 & 17 as your desktop background.

🌎 Set the latest image from GOES 16 & 17 as your desktop background.

goes-bg A small command line program to set your desktop background to the latest Full Disk GeoColor image from GOES-16 and GOES-17. GOES-16 and GOES-

Apr 15, 2022

All in one YouTube App with downloader , background player and many more features.

All in one YouTube App with downloader , background player and many more features.

YT PRO Download YT PRO Features Video Downloader Ads Blocker Picture in Picture Mode Shows Number of Dislikes Background Audio Player Auto Updation of

Dec 31, 2022
Owner
null
Happy Birthday is a web-based party live background generated by CANVAS powered by JavaScript. This show a lot of random colorize particles in the background.

Happy BirthDay JS Happy Birthday is a web-based party live background generated by CANVAS powered by JavaScript. This show a lot of random colorize pa

Max Base 9 Oct 29, 2022
A fixed-width file format toolset with streaming support and flexible options.

fixed-width A fixed-width file format toolset with streaming support and flexible options. Features Flexible: lot of options Zero dependencies: small

Evologi Srl 6 Jul 14, 2022
Framework for interacting with instagrams private api in a usable manner (forked from andre's work and improved and fixed)

node-ig-framework Framework for interacting with instagrams private api in a usable manner (forked from andre's work and improved and fixed) Installat

nine ecksen 3 Dec 31, 2022
Javascript library for switching fixed elements on scroll through sections. Like Midnight.js, but without jQuery

Library for Switching Fixed Elements on Scroll Sometimes designers create complex logic and fix parts of the interface. Also they colour page sections

Vladimir Lysov 38 Sep 19, 2022
Fixed-point math for Bitcoin Script

bsv-fixmath Fixed-point implementations of exp, log, root and pow for Bitcoin SV. This repo contains two equivalent implementations, one in Typescript

Vala 5 Oct 18, 2022
The best Blooket hacks on the platform! These hacks are always working, all gamemode hacks work and will be fixed when broke.

Support Discord Server: https://discord.gg/UCHtVM4A Blooket Hack The Blooket Hack provided by Jude Why you should use this tool: Always working. When

Jude 26 Dec 20, 2022
An open-source Typing-effect Library, That enables potential users to add a typing effect to mere DOM Elements.

Typing Effect Library An open-source Typing-effect Library I created. That enables potential users to add a typing effect to mere DOM Elements. Tool P

Okoye Charles 14 Oct 3, 2022
Flexible, powerful and modern library for creating the running horizontal blocks effect, also known as ticker or the «marquee effect».

Cuberto Reeller Flexible, powerful and modern library for creating the running horizontal blocks effect, also known as ticker or the «marquee effect».

Cuberto 41 Jan 4, 2023
Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Especially designers and/or photographers will love this theme! Built with MDX and Theme UI.

Gatsby Starter Portfolio: Cara Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Using the Gatsby Theme @lekoarts/gat

prashanth s 1 Dec 24, 2021
Seamless and lightweight parallax scrolling library implemented in pure JavaScript utilizing Hardware acceleration for extra performance.

parallax-vanilla.js Seamless and lightweight parallax scrolling library implemented in pure JavaScript utilizing Hardware acceleration for extra perfo

Erik Engervall 91 Dec 16, 2022