Adding resize event