Please extend a method 'appendTo' to append the window to a special <div> element.
<script>
(function($){
$.extend($.fn.window.methods, {
appendTo: function(jq, to){
return jq.each(function(){
var state = $(this).data('window');
$(this).window('window').appendTo(to);
$(state.mask).appendTo(to);
$(state.shadow).appendTo(to);
});
}
});
})(jQuery);
</script>
The code below shows how to show a messager window in a '#cc' div container.
var d = $.messager.alert({
title: 'My Title',
msg: 'Here is an error message.',
icon: 'error',
inline: true
});
d.dialog('appendTo', '#cc');
d.dialog('resize').dialog('center');