Only 166 days until the European Accessiblity Act comes into force. Are you and your organisation ready? Schedule a free introductory call to find out more.

Check whether a DOM element exists using jQuery

A straightforward little post: if you want to detect whether a DOM element actually exists on the page (perhaps you’re flying in the blind), you can write if ($('selector').length) { // Foo }. If the element is present, it’ll evaluate to true and you can work from there.