Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.
/ scrollFade Public archive

A JQuery plugin to let HTML elements fade in and out while scrolling

License

Notifications You must be signed in to change notification settings

GittiHab/scrollFade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JQuery Scroll Fade Plugin

Apply this plugin to an html element and it will either fade in or out when you scroll.

Usage

Include JQuery Include scrollFade.js or scrollFade.min.js (recommended, if you don't want to make changes)

There are two methods you can use:

  • $(el).scrollFadeIn(offset, start)
  • $(el).scrollFadeOut(offset, start)

The offset and start values are optional. offset is the fade out way (duration): if you scroll the number of pixels set in it, the element will be faded in or out. Default: 500.

The start value tells when the fading should start. If you have an element which is outside the viewport on page load it might be clever to set the offset, so it fades in/out while the user can see it. Default: 0.

Example Usage

$(document).ready(function () {
    $('#fadeIn').scrollFadeOut(500);
});

License

This code is published under the Apache 2.0 license.

About

A JQuery plugin to let HTML elements fade in and out while scrolling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published