check if element is visible in viewport