use jQuery to set elem properly.  Otherwise, a JavaScript error occurs when clicking the "Add to body" button.