Get client screen size in a browser by Javascript
using this simple code you can have the size of your client area in pix
function getScreenSize() {
var w = window,
d = document,
e = d.documentElement,
g = d.getElementsByTagName('body')[0],
x = w.innerWidth || e.clientWidth || g.clientWidth,
y = w.innerHeight|| e.clientHeight|| g.clientHeight;
return x + 'px ' + y + 'px';
}
window.addEventListener('resize',);