我希望对话框具有最大高度设置,但如果内容较小,则缩小到height = 'auto'所做的操作。是否可以在JQuery UI对话框中执行此操作?
发布于 2013-09-16 07:41:45
我使用的是:
$('#dialog').dialog({
maxHeight: $(window).height(),
open: function() {
$(this).dialog('option', 'maxHeight', $(window).height());
}
});当窗口大小改变时,在"open“中重置maxHeight是很有用的。
发布于 2011-04-14 18:43:36
你可以这样做:
$('#testing').resizable("enable");
$('#testing').dialog({ maxHeight: 400 });
<div id="testing" class="ui-widget-content">
<h3 class="ui-widget-header">Resizable</h3>
</div>发布于 2012-11-26 21:19:26
对话框.open()之后,并使用.html()填充
$("#div").css('max-height','500px');https://stackoverflow.com/questions/5661913
复制相似问题