Trigger before/after load on the right elements, and trigger beforeload before actually replacing content