TjlGithub / rellax

Lightweight, vanilla javascript parallax library

Home Page:https://dixonandmoe.com/rellax/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RELLAX

Rellax is a buttery smooth, super lightweight (871bytes gzipped), vanilla javascript parallax library. Rellax limits the parallax feature to laptop/desktop screens since the effect is negligible on smaller screens.

Have any suggestions or feedback? Reach out @dixonandmoe

Getting Started

npm install rellax --save or if you're old school like us download and insert rellax.min.js

<div class="rellax">
  I’m that default chill speed of "-2"
</div>
<div class="rellax" data-rellax-speed="7">
  I’m super fast!!
</div>
<div class="rellax" data-rellax-speed="-4">
  I’m extra slow and smooth
</div>

<script src="rellax.min.js"></script>
<script>
  // Accepts any class name
  var rellax = new Rellax('.rellax');
</script>

Development

In the spirit of lightweight javascript, the build processes (thus far) is lightweight also.

  1. Open demo.html
  2. Make code changes and refresh browser
  3. Once feature is finished or bug fixed, use jshint to lint code
  4. Fix lint issues then use Google Closure Compiler to minify
  5. 🍻

About

Lightweight, vanilla javascript parallax library

https://dixonandmoe.com/rellax/

License:MIT License


Languages

Language:HTML 46.9%Language:JavaScript 27.0%Language:CSS 26.1%