<script> $( window ).resize(function(){}); // jquery window.onresize = function(){} // javascript </script> <body onresize="func()">