Check if an element is in the viewport