javascript when screen size changes code example
Example 1: js detect screen size change
window.onresize = function(){
console.log("resize");
}
Example 2: javascript on screen width change
$(window).resize(function() {
/* Do shit */
console.log('window was resized');
});