/ Published in: JavaScript
URL: http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/
Expand |
Embed | Plain Text
if ($("#mydiv").length > 0){ // do something here }
You need to login to post a comment.
jmacgr on 01/12/10
1 person have marked this snippet as a favorite
URL: http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/
if ($("#mydiv").length > 0){ // do something here }
You need to login to post a comment.