closest and offsetParent now work with objects not in the dom