javascript - Calculate height of div -
i have div set height.
<div class="foo" style="height:100px;">bar</div>
is possible find div's height if height not explicitly set style property?
in other words, i'd find height of following div without changing div.
<div class="foo">bar</div>
var clone = $('.foo').clone(); clone.css('height', 'auto'); clone.css('visibility', 'hidden'); $('body').append(clone); console.log(clone.height());
Comments
Post a Comment