Get the final height of jquery's slideToggle() before it finishes executing - without fixed heights in CSS
问题 I need a div B on my website to update dynamically according to the run time changing height of another div A . div A uses the jquery slideToggle() [on several divs inside the div A ], but div B should only be changing (at the same time) to match the current height of div A . panel_toggle1 and panel1 are contained inside div A : $(document).ready(function () { $("#panel_toggle1").click(function () { $("#panel1").slideToggle("slow", function () { var divAheight = $("#divA").height(); $("#divB"