🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

fadeInElements.js is a very small (~3kb) jQuery plugin that detects the scroll position and adds a fadeIn effect to specific elements as they scrolled into view.

fade-in

Documentation

Fade-in-Elements-Scroll

A jquery plugin to fade in elements on scroll

Description

This jquery plugin allows you to fade in elements as you scroll down the page.

Demo

- No options: http://jsfiddle.net/john23/p4xre4up/7/

Options

There are two options: "fadeDuration" and "fadePosition" which you can pass into the fadeInElements function. Fadeduration, like the name suggests, is just the time it takes your elements to fade in (ms). Fadeposition allows you to adjust when your elements fade in as you scroll down the page. It is given in a percentage of the window inner height. For instance, if you pass in "25" the elements will begin to fade in when they hit 25% of the window height from the bottom of the screen. All elements that are to fade in need their css opacity set to "0".

Usage

Script tag

Include a script tag in your HTML to reference the plugin:
<script src = "fadeInElements.js"></script>  

Javascript:

Basic usage:

$('yourElements').fadeInElements();  

options:

$('yourElements').fadeInElements({ 	fadeDuration: 5000,  	fadePosition: 25 });  

CSS:

yourelements {   opacity: 0; }  

You May Also Like