javascript detect screen size changes on expand code example Example: js detect screen size change window.onresize = function(){ console.log("resize"); }