Emulates 'resize' events on elements