js recognise screen size code example
Example 1: get window resolution javascript
var clientWidth = document.documentElement.clientWidth;
$("h2").text(clientWidth);
Example 2: get screen resolution jquery
window.screen.width
var clientWidth = document.documentElement.clientWidth;
$("h2").text(clientWidth);
window.screen.width