I am using modal dialog box from jQuery UI. I want to make a Ajax call to display the content in my dialog box.
$(function(){
$( #myLink ).live("click", function(){
$( #lbContent ).dialog( open );
var url= $(this).attr("href");
$( div#lbContent ).empty();
$( div#lbContent ).load(url);
return false;
});
$( #lbContent ).dialog({
stack:true,
bgiframe: true,
autoOpen: false,
height:500,
width:700,
modal: true,
resizable:true
});
});
Now, when I click on the link it displays the content in the modal dialog box as expected.
But when I close that dialog box and again click on the same link then that dialog box is not opening. I tried to give alerts in between.
When I refresh the page and click the link then it works as expected.