Fork me on GitHub

jQuery Prompt21

A minimalist jQuery prompt plugin for the 21st Century.

Download .zip Download .tar.gz View on GitHub

Demo

<script src="path/to/jquery.js"></script>
<script src="path/to/jQuery-prompt21.js"></script>
<script>
    var p = $(".popup").prompt21();
    $(".show-popup").on("click", function () {
        p.getData(function (err, data) {
            $(".result").text(JSON.stringify(data, null, 2));
        });
    });
</script>
Click the "Prompt Popup" button.

Documentation

unflattenObject(flat)

Converts a flat object to an unflatten one

Params

Return

prompt21(opt_options)

Initializes a new instance of Prompt21.

Example:

var p21 = $(".container").prompt21();
            

Params

Return

getData(callback)

Shows the popup and calls the callback function when the OK button is clicked.

Params

Check out the The project on GitHub.