Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 629 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 629 Bytes

Yet Another Modal Dialog

Description

A simple modal dialog using jQuery.

Usage

Show text in a modal dialog:

$.modal().open('Lorem ipsum dolor sit amet, tale sadipscing qui ne, te dicat antiopam torquatos nam.');

Open a modal dialog containing the response of an Ajax request:

$.modal().ajax('/legal/terms');

Show the contents of a DOM element in a modal dialog:

$('#form').modal();

Open a modal dialog on click:

$('.edit').click(function (event) {
    $.modal().ajax('/user/edit', $(event.target).data());
    event.preventDefault();
});