Learn how to find out if an element is hidden with JavaScript.
Read on how to do it in this tutorial: https://www.w3schools.com/howto/howto_js_check_hidden.asp
Try it yourself here: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_check_hidden2
Tip: Also check out How To - Toggle Hide/Show.
Tip: For more information about Display and Visibility, read our CSS Display Tutorial.