trigger events when the page is updated