Work on minimal-dom example, changed jquery handlers to document instead of body