如何获得由 jQuery 设置的 DIV 的高度?
$('.bar2').animate({'height':'58' + "%"},1500);
当我检查 chrome 中的元素时,我看到我的 DIV 高度设置为 58%
<div class="bar2" style="height: 58%; background-image: ......>
我试过这个:
var bar2 = $(".bar2").height(),
或者var bar2 = $(".bar2").css('height'),
但我总是得到我的“最小高度”,即 70px,而不是由 jQuery 设置的高度