行。所以我使用下面的代码来调整 div 的高度,但由于设计是流畅的(我不希望它固定)。它工作得很好,但是一旦高度改变而不重新加载页面,高度就会有错误的值。
因此,我需要添加某种检查高度是否已更改,然后在不重新加载页面的情况下对其进行更新。我只想要 jQuery 解决方案,请不要提交任何 CSS 解决方案,因为该脚本也将用于不是其他人的孩子或父母的 div。
$("#conten_area .sticky_note:has(.right_panel)").each(function (index, value) {
var $this = $(this);
current = $this.height();
current = current+22;
$this.find(".right_panel").height(current);
});