if function exists jquery code example Example: Is there an “exists” function for jQuery if ($(selector).length)