3 Ways to Check If Element is Visible or Hidden using jQuery

Written by Ubaidullah| JS

Do you want to test whether an element is visible or hidden using jQuery? Here, you’ll learn three approaches to finding out if an element is visible or hidden with jQuery.

Table of Contents: Check if Element is Visible using jQuery

  1. Using jQuery’s .is() (Best Approach)
  2. Using jQuery’s .css() for display:none
  3. Using jQuery’s .css() for visibility:visible or visibility:hidden
  4. Video Tutorial & Demo

Using jQuery’s .is()

HTML

jQuery


Using jQuery’s .css() for display:none

HTML

jQuery


Using jQuery’s .css() for visibility:visible or visibility:hidden

HTML

jQuery

Above methods are going to enable you to check if an element is hidden or visible using jQuery.


Video Tutorial & Demo

3 Ways to Check If Element is Visible or Hidden using jQuery
Rate this post

Last modified: June 6, 2017

Leave a Reply

Your email address will not be published. Required fields are marked *