In html I assigned div height as 100%
in inline css,when loading height of div
is changed as 0. Why its happen?
refer this
http://jsfiddle.net/CLjH3/3/
This is my code sample:
display();
function display() {
var elementHeight = $("#container").height();
alert("ElementHeight :" + elementHeight);
var elementWidth = $("#container").width();
alert("ElementWidth :" + elementWidth);
}
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
</head>
<body>
<div id="container" style="height:100%;width:100%;border:solid 1px red;">
</div>
</body>