javascript get window screen width on resize code example
Example 1: get window resolution javascript
var clientWidth = document.documentElement.clientWidth;
$("h2").text(clientWidth);
Example 2: js detect screen size change
window.onresize = function(){
console.log("resize");
}