Skip to content

kaiku/jquery-crossfader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 18, 2013
c903936 · Feb 18, 2013

History

5 Commits
Feb 17, 2013
Feb 18, 2013
Feb 17, 2013
Feb 17, 2013

Repository files navigation

jquery-crossfader

"Crossfades" background images with trickery.

Description

This is basically a slideshow plugin that crossfades large background images behind all other content on screen.

Usage

var jqcf = $.crossfader({
    backgrounds: ['/my/image/1.jpg', '/my/image/2.jpg'],
    interval: 8000,
    fadeDuration: 3000,
    zIndex: -10
});

Only the backgrounds array is required.

interval sets how many milliseconds to wait before transitioning to the next image.

fadeDuration sets how many milliseconds the fade transition should last.

zIndex sets the largest z-index that will be used for the two overlays.

To stop the crossfading at any point, just do:

jqcf.stop();

Features

  • Preloads the next image immediately after fade in.
  • Is simple.
  • Hopefully it helps you!

About

"Crossfade" background images with trickery.

Resources

License

Stars

Watchers

Forks

Packages

No packages published