Determine whether or not to scroll based on bottom of element instead of document