jQuery UI Dialog Box
by ChrisStanyon
HTML
<div id="dialog-reminder" style="display:none;">This is the dialog box</div>
<button id="openDialog">Open the Dialog Box</button>
JavaScript
$(document).ready(function() {
$('#openDialog').click(function() {
$('#dialog-reminder').dialog('open');
});
$('#dialog-reminder').dialog({
autoOpen: false,
buttons: [
{ text: "Close Me", click: function() { console.log( $(this).dialog() ); $( this ).dialog( "close" ) } },
{ text: "Save Me", click: addNote }
]
});
});
function addNote() {
alert("We're now running addNote!");
}