Window Height Width using jquery
by Prasad
HTML
<input type="checkbox" name="chk" id="chk" checked/>
<input type="text" id="txt" />
<div id="showh" onclick="javascript:showhh();" style="width:500px;height:400px; border:1px solid #333;">5</div>
<table border="1" width="50%">
<tr id="one" onclick="AddAfter('one');">
<td>
first row
</td>
</tr>
<tr id="two" onclick="AddAfter('two');">
<td>
second row
</td>
</tr>
</table>
CSS
tr
{
height:30px;
border:1px solid #333;
}
JavaScript
function showhh()
{
//var id=$('#')+idname;
var wh;
wh=window.innerheight;
alert(self.innerHeight);
}
function AddAfter(rowId){
var target = document.getElementById(rowId);
var newElement = document.createElement('tr');
target.parentNode.insertBefore(newElement, target.nextSibling );
return newElement;
}
$(document).ready(function(){
$('#txt').on('keyup',function(){
$('#chk').attr('checked',false);
});
})