Accessible Dialog 1.3

Accessible Modal Dialog



Details

Author
3i1a4o
Current version
1.3
GitHub
mashalla/dialog
Downloads
4572
Category
Widgets
Tags
Report
GitHub Issues

Releases


Dependencies

  • core:1.3.2/Element.Event/core: 1.3.2
  • _self_/_current_: Core/MooTools

How to use

<input class='button' id="dialogDemo" type="button" value="trigger Dialog" role="button"/>

#JS
window.addEvent('domready', function(){
    var dialogCme = new DialogCME({
        'alert':false, // Is it an alert dialog?
        'closeButton':true, // Do you need a closeButton?
        'title':'DemoDialog', // Title of the dialog
        'content':"<p>This is an Wai Aria Demo Dialog</p><p>Please enter information.</p><label for='field1'>field 1: </label><input id='field1' type='text'><br><br><label for='field2'>field 2: </label><input id='field2'type='text'>",
        'submit':{
            'exists':true, 
            'value':'Submit',
            'fn': function(e){ // Function which is triggered by pushing the submit button
                this.hide()
            }
        },      
        'cancel':{
            'exists':true,
            'value':'Cancel',
            'fn': function(e){ // Function which is triggered by pushing the submit button
                this.hide()
            }
        }
    });
    // Defines when the dialog is triggered
    $('dialogDemo').addEvent('click', function(e){
        e = new Event(e).stop();
        dialogCme.show();
    }.bind(this));
});

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