Overlay 0.95

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



Details

Author
David Walsh
Current version
0.95
GitHub
darkwing/Overlay
Downloads
15347
Category
Effects
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_:
    • Core/Class
    • Core/Element.Style
    • Core/Element.Event
    • Core/Element.Dimensions
    • Core/Fx.Tween

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


Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus