You don't need to pass the second argument if local option was not necessary.
$(function(){
$('#apiex-ajax-open').click(function(){
window.domwindowApi.open('dialog1.html', {
ajaxdialog: true,
width: 400,
height: 600,
beforeopen: function(e, data){
console.log('beforeopen!', data.dialog);
},
afteropen: function(e, data){
console.log('afteropen!', data.dialog);
},
beforeclose: function(e, data){
console.log('beforeclose!', data.dialog);
},
afterclose: function(e, data){
console.log('afterclose!', data.dialog);
}
});
});
});
$(function(){
$('#apiex-iframe-open').click(function(){
window.domwindowApi.open('dialog2.html', {
iframedialog: true,
width: 600,
height: 200,
beforeopen: function(e, data){
console.log('beforeopen!', data.dialog);
},
afteropen: function(e, data){
console.log('afteropen!', data.dialog);
},
beforeclose: function(e, data){
console.log('beforeclose!', data.dialog);
},
afterclose: function(e, data){
console.log('afterclose!', data.dialog);
}
});
});
});
$(function(){
$('#apiex-iddialog-open').click(function(){
window.domwindowApi.open('iddialogcontent', {
iddialog: true,
width: 800,
height: 800,
beforeopen: function(e, data){
console.log('beforeopen!', data.dialog);
},
afteropen: function(e, data){
console.log('afteropen!', data.dialog);
},
beforeclose: function(e, data){
console.log('beforeclose!', data.dialog);
},
afterclose: function(e, data){
console.log('afterclose!', data.dialog);
}
});
});
});
Iddialog also works with '#id'
$(function(){
$('#apiex-iddialog-open').click(function(){
window.domwindowApi.open('#iddialogcontent', {
width: 800,
height: 800,
});
});
});
$(function(){
var str = [
'<div style="padding:30px">',
' <h2>iddialog example</h2>',
' <p><a class="apply-domwindow-close" href="#">close</a></p>',
'</div>'
].join('');
$('#apiex-strdialog-open').click(function(){
window.domwindowApi.open(str, {
strdialog: true,
width: 800,
height: 800,
beforeopen: function(e, data){
console.log('beforeopen!', data.dialog);
},
afteropen: function(e, data){
console.log('afteropen!', data.dialog);
},
beforeclose: function(e, data){
console.log('beforeclose!', data.dialog);
},
afterclose: function(e, data){
console.log('afterclose!', data.dialog);
}
});
});
});