Check out my code snippet:
<div class="content">
<a href="/profile/Nat's Rare & Raw" class="link-name"><strong>Irene Natalia</strong></a>
Hooray! we'll proceed with the shipping and inform the tracking # tomorrow :) Thank you, Angel! :)
<br>
<span class="date">7 days ago</span>
</div>
I'm trying to determine the height of this div using javascript. Is there a method for accomplishing this task? The width of this div is fixed at 150px. I am specifically interested in knowing its height in case the content changes. I would prefer using jQuery, but regular Javascript works too.
UPDATE:
An important detail to note here is that this calculation needs to be made before the div is rendered on the webpage. I am working on creating a pinterest-style layout and need to calculate the comment section's height within each item card so that masonry can arrange it properly even before the image loads.