How to check if an element is hidden on a page using jQuery?
Hi everyone! I'm a beginner frontend developer and I've encountered a problem: I need to determine if a specific element is hidden on a page using jQuery.
I have several information blocks that I hide and show on button clicks. I need to check if a particular block is currently visible before performing any actions on it (such as animation or class changes).
I know that CSS can hide elements in different ways: via `display: none`, `visibility: hidden`, or even through zero opacity `opacity: 0`. Elements can also be hidden using jQuery methods `.hide()` and `.show()`.
The problem is that I tried using the `:hidden` selector, but it doesn't seem to always work as I expect. For example, here's my code:
```javascript