How do you check if a selector exists in jQuery?

Posted by One Crayon on Stack Overflow See other posts from Stack Overflow or by One Crayon
Published on 2008-11-18T19:13:31Z Indexed on 2010/05/27 15:11 UTC
Read the original article Hit count: 103

Filed under:
|
|

In Mootools, I'd just run if ($('target')) { ... }. Does if ($('#target')) { ... } in jQuery work the same way?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery