When I open a dialog box and close it in my page and try to reopen it by clicking an button it doesn’t open again. What’s wrong with my code?
<script type="text/javascript">
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function() {
$(".dialog").dialog({
autoOpen: false,
show: "blind",
hide: "explode",
});
});
</script>
<script type="text/javascript">
function pass_url(url) {
$(".opener").click(function () {
$(".dialog").dialog("open");
$('.dialog').load(url);
return false;
});
}
</script>
This looks like you’re replacing your dialog contents with the contents of
url.Why not fill a child element of
.dialoginstead?