Add transitionEnd events to loadDoc