Any ideas on how to get a div\'s height without using jQuery?
I was searching Stack Overflow for this question and it seems like every answer is pointing to jQuery\'
In addition to el.clientHeight and el.offsetHeight, when you need the height of the content inside the element (regardless of the height set on the element itself) you can use el.scrollHeight. more info
This can be useful if you want to set the element height or max-height to the exact height of it's internal dynamic content. For example:
var el = document.getElementById('myDiv')
el.style.maxHeight = el.scrollHeight+'px'