Get Window Size on Resize or Orientation Change using Javascript

by Sasikumar 2014-04-22 11:31:09

Get window size on resize or orientation change using javascript
Bind the "resize orientationchange" function to the window, on change get "cliendWidth" and store it in a variable.
$(window).bind('resize orientationchange', function() {
var ww = document.body.clientWidth;
alert(ww);
});
716
like
0
dislike
0
mail
flag

You must LOGIN to add comments