Skip to content

Instantly share code, notes, and snippets.

@elclanrs
Created August 19, 2012 04:47
Show Gist options
  • Save elclanrs/3392154 to your computer and use it in GitHub Desktop.
Save elclanrs/3392154 to your computer and use it in GitHub Desktop.
function newDialog(id) {
var $div = $('<div id="#'+ id +'"/>').dialog({
open: function() {
$(this).append(
'<textarea class="content-area">Content</textarea>'+
'<textarea class="input-area">Input</textarea>'
)
},
title: id
});
$('body').append($div);
}
$(document).ready(function() {
newDialog('mydialog');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment