Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (47.6k points)

It is possible to toggle the visibility of an element, using the functions .hide(), .show() or .toggle()?

How would you test if an element is visible or hidden?

1 Answer

0 votes
by (106k points)
edited by

To check if an element is hidden in jQuery you can use visible and hidden method based on the value it will return true or false:

$(element).is(":visible"); 

$(element).is(":hidden");

Enroll in our web development course to become as an expert in Web Development!

Related questions

Browse Categories

...