I can not add button to this jquery ui dialog. if possible please give me an example . thanks.
Here is an example
add this to your function:
buttons: {
OK: function() { //submit
$( this ).dialog( "close" );
},
Cancel: function() { //cancel
$( this ).dialog( "close" );
}
}
So you get
$('#msgBox').dialog({
autoResize: true,
show: "clip",
hide: "clip",
height: 'auto',
width: 'auto',
autoOpen: false,
modal: true,
position: 'center',
draggable: false,
buttons: {
OK: function() { //ok
$( this ).dialog( "close" );
},
Cancel: function() { //cancel
$( this ).dialog( "close" );
}
}
open: function (type, data) {
$(this).parent().appendTo("form");
}
});