jQuery UI & Dialog: Modal Dialog Box Alert

This entry is part 2 of 6 in the series jQuery UI Dialog

jQuery UI Dialog – Modal message

Use a modal dialog to explicitly acknowledge information or an action before continuing their work.

Set the modal option to true, and specify a primary action (Ok) with the buttons option.

<!doctype html>
<html lang='en'>
    <meta charset='utf-8'>
    <title>jQuery UI Dialog - Modal message</title>
    <link rel='stylesheet' href='//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css'>
    <script src='//code.jquery.com/jquery-1.9.1.js'></script>
    <script src='//code.jquery.com/ui/1.10.4/jquery-ui.js'></script>
    <link rel='stylesheet' href='http://codecrawl.com/code/jqueryui/jqueryui_style.css'>
        $(function () {
                modal: true,
                buttons: {
                    Ok: function () {

<div id='dialog-message' title='Download complete'>
        <span class='ui-icon ui-icon-circle-check' style='float:left; margin:0 7px 50px 0;'></span>
        Your files have downloaded successfully into the My Downloads folder.

        Currently using <b>36% of your storage space</b>.

<p>Modal Dialog Box Alert Demo</p>

Try The Code

Series Navigation<< jQuery UI & Dialog: Basic Dialog Box
jQuery UI & Dialog: Dialog With Animation >>

Leave a comment

Leave a Reply