Check if the target element is inside the viewport