SyntaxFix
Write A Post
Hire A Developer
Questions
I just added the following line after you created the dialog:
$(".ui-dialog").prependTo("form");