How to Get the Hidden Item Height


This question already has an answer here:

  • jQuery: Get height of hidden element in jQuery 15 answers

I have hidden element in my webpage, I need to get height of that element. I have tried with .clientHeight, offsetHeight, .height(), and window.getComputedStyle but non of this working in attached scenario. Is there any trick to get height without adding any plugin. fiddle


<div class="frame">
<p>some text some text some text some text</p>



var p = $('.frame p').clone().css('display', 'none');
alert(p.height()); // 19

Working example: