I have a jQuery UI dialog that is now set to a specific height:
$(".event").click(function () {
var id=$(this).attr("data-id");
$("<div></div>")
.addClass("modal-dialog")
.appendTo("body")
.dialog({
close: function() { $(this).remove(); },
modal: true,
height: 600,
width: 700
})
.load("/Home/users?xid=" + id);
});
I would like for my dialog to resize its height depending on the content in it.
I tried changing to height: auto
but then it would not open at all.
I also found this thread: Automatically resize jQuery UI dialog to the width of the content loaded by ajax But i do not understand how to apply it to my own code.