How do I get height of DIV, that is set by jQuery?$('.bar2').animate({'height':'58' + "%"},1500);
When I inspect elements in chrome I see that my DIV height is set to 58%
<div class="bar2" style="height: 58%; background-image: ......>
I have tried this:
var bar2 = $(".bar2").height(),
or var bar2 = $(".bar2").css('height'),
but I always get my "min-height" which is 70px, not height that is set by jQuery
I think you would use:
$(".bar2").outerHeight();
Which is the computed height or
$(".bar2").innerHeight();
If you don't need to take account margin and padding and what-not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With