Skip to content

Rotate and cross fade background images with this simple jQuery plugin.

Notifications You must be signed in to change notification settings

Pamblam/RotateBG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RotateBG

By: Robert Parham | License: wtfpl.net WTFPL | Version: 1

Rotate and cross fade background images with this simple jQuery plugin.

Basic Usage:

$.RotateBG({
	// An array of background images to rotate through
	Backgrounds:['img1.png', 'img2.png', 'img3.png'],

	// How many seconds to pause between rotations [Optional]
	Interval: 8,

	// An image that will be displayed while the first image is preoading [Optional]
	LoadingImg: "./img/loader.gif",

	// if LoadingImg is set, this will be the background color behind the image [Optional]
	LoadingBGColor: "#2A2826",

	// Shuffle the Backgrounds array? [Optional]
	Shuffle: true,

	// A function to be executed when the first image is done loading [Optional]
	onLoaded: function(){ console.log("First image has loaded."); },

	// The speed of the crossfade. A number less than one. [Optional]
	FadeSpeed: 0.1
});

About

Rotate and cross fade background images with this simple jQuery plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published