【发布时间】:2013-03-20 22:23:59
【问题描述】:
当窗口被调整大小时,我正在使用 jQuery 来调整元素的大小:
$(window).resize(function() {
topHeight = $("#top").height();
height = $(window).height() - 210;
$("#container").height(height);
$("#g").height(height-25);
});
topHeight 获取顶部栏的最新高度,因为它可以重新排列。
我的问题是,当#top 改变高度时,我无法找到调整#container 大小的方法。我试过使用$("#topRow").resize(function() { }),但它似乎不适用于元素。
【问题讨论】:
标签: javascript jquery css html