Skip to content
MooTools background switcher class with full screen option
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

MooTools Unobtrusive Background Image Switcher

This MooTools class switches background images of a website - can be used as an image slider or a full screen background image switcher.

Infos and Demo

How to use

To use this class just create an instance and pass it an array of image URLs, the second optional parameter contains further options.

    var srcBgArray = [
    window.addEvent('domready', function(){
      new BgSwitcher(
        {alt: 'Alt text', wrapperId: 'some-id'}

Full screen functionality uses both JavaScript and CSS so if you want the full screen option to work, download the whole package and see our bare bones style.css. The CSS part is based on Perfect Full Page Background Image / CSS-Only Technique #2 from css-tricks -

You can’t perform that action at this time.