find the closest parent element (given a selector) of the cursor