added target to window.onresize function