js check screen resolution code example
Example: get window resolution javascript
var clientWidth = document.documentElement.clientWidth;
$("h2").text(clientWidth);
var clientWidth = document.documentElement.clientWidth;
$("h2").text(clientWidth);