listen domready on doc instead of window