How to Determine if an Element Exists with jQuery?

jQuery makes it easy to determine if an element in your DOM exists.

if ( $('#elementID').length )
{
 // do something
}

Simple enough, right?

Want to learn more about jquery? Try this resource...

jQuery: Novice to Ninja