Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Overlay is a compact, simple overlay class which allows for maximum control over its use.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Demos
Octocat-spinner-32 Docs Added new zIndex option December 20, 2009
Octocat-spinner-32 Source
Octocat-spinner-32 README.md
Octocat-spinner-32 package.yml
README.md

Overlay

Overlay is a compact, simple overlay class which allows for maximum control over its use.

Screenshot

How to Use

Overlay may be initialized at any time. The first and only required argument is the overlay's "container" which is usually document.body. Options may be given as the second argument.

Overlay also provides click, close, hide, open, and show events.

Javascript

var overlay = new Overlay(document.body,{
        id: 'overlay',
        color: '#000',
        duration: 300,
        opacity: 0.4,
        onClick: function() {
            this.close();
        },
        onOpen: function() {
            //make ajax call while the overlay is happening...?
            //var Request = new Request()....
        }
});

For specific usage and options, please read the documentation or visit http://davidwalsh.name/js/overlay

Something went wrong with that request. Please try again.