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

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -