change onresize to resize. Because chrome have bug with onresize