jquery window resize
In This Script we will learn jquery windows resize script..Just follow the below example how to browser window height and width on jquery windows resize..
index.html
<style>
span{
font-size:16px;
font-weight:bold;
font-style:italic;
color:green;
}
.window{
font-size:18px;
font-weight:bold;
color:red;
}
</style>
<h2>Jquery Browser Window Resize Script</h2>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td><span>Window Resize Width:</span></td>
<td><div class="window" id='rwidth'></div></td>
</tr>
<tr>
<td><span>Window Resize Height:</span></td>
<td><div class="window" id='rheight'></div></td>
</tr>
</table>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type='text/javascript'>
$(document).ready(function(){
resizee();
$(window).resize(function(){
resizee();
});
function resizee() {
$height = $(window).height();
$width = $(window).width();
$("#rwidth").text($width);
$("#rheight").text($height);
}
});
</script>
That's It Friends Jquery windows resize..Thank you .keep visiting...


No comments:
Post a Comment
Thank You for Your Comment
Note: Only a member of this blog may post a comment.