I have customized a div on a webpage that I want to display as a preview in a dialog box using jQuery's clone function. Now I am trying to make the cloned div readonly once it is displayed in the dialog. Can someone please help me with this? Thank you.
function callPreview()
{
$('#maincontainer').clone().appendTo('#previewDiv');
document.getElementById('previewDiv').disabled=true;
$.fx.speeds._default = 500;
$(function() {
$( "#previewDiv" ).dialog({
autoOpen: false,
width:600,
height:800,
autoClose: false,
show: "fold",
hide: "core",
resizable:false
});
$( "#previewBtn").click(function() {
$( "#previewDiv" ).dialog( "open" );
return false;
});
});
}