added option to pass in a DOM node directly instead of requiring an id