A simple modal dialog using jQuery.
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();
});