How to track window size with jquery
Track window size with jquery is simple.You can use this method to achive many things in your website.
HTML
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<h2>Resize window to check realtime window size</h2>
<div id="window-width"></div>
<div id="window-height"></div>
JavaScript
$(document).ready(function(e) {
$win_w=$(window).width();
$win_h=$(window).height();
$('#window-width');
$('#window-height');
});
$(window).resize(function(){
$win_w=$(window).width();
$win_h=$(window).height();
$('#window-width').html("Window Width : "+$win_w);
$('#window-height').html("Window Height : "+$win_h);
});