How to Check an Element is Visible or not using jQuery
You can use .is(':visible') to check whether an element is visible in the layout or not.
Elements are considered visible if they consume space in the document. Visible elements have a width or height that is greater than zero. The :visible selector selects every element that is currently visible.
Elements with visibility: hidden or opacity: 0 are considered to be visible, since they still consume space in the layout. During animations that hide an element, the element is considered to be visible until the end of the animation.
The same works with .is(':hidden') to check whether an element is visible in the layout or not.