I'm using jquery ui dialog, and able to bring up the modal dialog fine the first time but when the same page is loaded again using ajax, dialog is not showing up. Even if i add create dialog code inside click, it doesn't help. This is happening only the second time. First time display is working as expected. I'm using 1.7.1 and ui 1.8.18. Please help
if (!$("#mydialog").is(':data(dialog)')) is returning false the second time.
I have below code:
$(document).ready(function() {
$( "#mydialog" ).dialog({
autoOpen: false,
resizable: false,
height: 350,
width: 550,
modal: true,
});
$("#test").on({
'click': function() {
$( "#mydialog" ).dialog( "option","title", "Test" );
$( "#mydialog" ).dialog( "open");
}
});
});