Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 258 Bytes

check_element_exists.md

File metadata and controls

9 lines (7 loc) · 258 Bytes

Check if an element exists

var exists = $('div.class').length > 0;
  • exists - will contain true if an element exists
  • div.class - selector to check existence of
  • length - will return number of elements that match given selector