I wonder if there is any way to get div height in pixels, although its height set earlier to 100% height.
This is required as div content is dynamic so div height has different values based on content itself.
Div by default is hidden.
I need to get div height in pixels for later manipulation (smooth scrolling will be done for div)?
Is there any way to do this?
Since you tagged jQuery, use
.show()it before calling
.height(), and you can hide it again straight away:
var $myEl = $('#myElement').show(); var height = $myEl.height(); $myEl.hide();