Jquery Check if an Element Exists Posted by sandipshirsale2013 on October 4, 2013 Posted in: Jquery tips. Tagged: Cascading Style Sheets, Chemical element, Document Object Model, dom, HTML element, JavaScript, jquery, Programming. Leave a comment To check whether an element exists, you can write the following code: if ($("#someElement").length) { //The DOM element exists } else { //The DOM element doesn't exist } Rate this:Share this:ShareTwitterPocketPinterestLinkedInRedditFacebookEmailTumblrLike Loading... Related Posts navigation ← WordPress Upload Files Easy Jquery Check if an Element Is Visible →