A function to get the scrolling parent of an html element.