我正在尋找一種方法使jQuery UI對話框高度根據內容動態變化。jQuery對話動態高度
這裏是我的代碼:
$("#dialog-modal_"+productID).html("<iframe src='index.php?act=showProduct&id="+productID+"' width='100%' height='100%' frameborder='0' scrolling='no'></iframe>");
$("#dialog-modal_"+productID).dialog(
{
width: 810,
height: 590,
resizable: false,
modal: true,
open: function(event, ui)
{
}
});
反正有沒有這樣做呢?
其寫成「auto」是默認值。甚至認爲,如果我刪除身高:....絕對,它仍然沒有工作 – user1936192
謝謝,它的工作! – informatik01