Return to Snippet

Revision: 22424
at January 12, 2010 10:29 by jmacgr


Initial Code
if ($("#mydiv").length > 0){
    // do something here
}

Initial URL
http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/

Initial Description

                                

Initial Title
How to check whether an element exists using jQuery

Initial Tags
jquery

Initial Language
JavaScript