update dom ready and event listener