Try this
$('#MyDiv').dialog({
autoOpen: false,
width: 'auto',
height: 'auto',
position: ['center', 20],
draggable:false,
resizable: false,
title: 'Form Preview',
modal: true,
show: 'fade',
hide: 'fade',
closeText: "",
open: function (event, ui) {
$('#previewContainer').html($("#abc").html());
},
close: function (event, ui) {
$(this).dialog('close');
}
});
$("#PreviewForm").dialog("open");
});