1) As per JQuery documentation (http://api.jquery.com/height/), if element parent is hidden then calculation of height can be error-prone.
2) For me, existing implementation was not considering padding and border - so this fix.
3) Added Gruntfile etc for minifying the code.