window.onresize = function(){ console.log("resize"); }

js detect screen size change