Scroll triggered Color Transition Effect With jQuery - Download Scroll-triggered Color Transition Effect With jQuery

Download Scroll-triggered Color Transition Effect With jQuery

Posted on

This time I will share jQuery Plugin and tutorial about Scroll-triggered Color Transition Effect With jQuery, hope it will help you in programming stack.

Scroll triggered Color Transition Effect With jQuery - Download Scroll-triggered Color Transition Effect With jQuery
File Size: 14.3 KB
Views Total: 377
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Scrolling Background Color is a really small jQuery plugin which makes use of jQuery color.js library to apply a smooth color transition effect to background when you scroll down the webpage.

How to use it:

1. Load the needed jQuery and jQuery color.js plugin in the html page.

1 <script src="jquery.min.js"></script>
2 <script src="jquery.color.min.js"></script>

2. Call the function to initialize the plugin with default options.

1 // for the entire page background
2 $(window).scrollingBackgroundColor();
3  
4 // for the background of #element
5 $('#element').scrollingBackgroundColor();

3. Specify the start/end colors you want to transition between.

1 $("#element").scrollingBackgroundColor( {
2   from: "#CCCCCC",
3   to: "#FFFFFF",
4 });

4. Set the target and watch elements.

1 $("#element").scrollingBackgroundColor( {
2   target: 'body',
3   watch : '#element'
4 });

This awesome jQuery plugin is developed by moshifr. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net