Use jQuery's is() to check the selected element with another element, selector or any jQuery object. This method traverses along the DOM elements to find a match, which satisfies the passed parameter. It will return true if there is a match, otherwise return false.
  1. // Checks CSS content for display:[none|block], ignores visibility:[true|false]  
  2. $(element).is(":visible");  
  3.   
  4. // The same works with hidden  
  5. $(element).is(":hidden");