Does anyone know how to create a jQuery Dialog in a function? I can\'t find an attribute to set the message... In every example I found, the dialog has been statically written i
Here is a simple example:
function openDialog(message) { if ($('#dialog').length == 0) { $(document.body).append(''+message+''); } else { $('#dialog').html(message); } $( "#dialog" ).dialog({ autoOpen: false, show: "blind", hide: "explode" }); $( "#dialog" ).dialog("open"); }