jQuery Test if Element Exists

Check if a specific HTML element exists on a web page using a custom jQuery plugin.

Code

$('selector').doesExist();
  /* return true|false if an element exists */
  jQuery.fn.doesExist=function(){return jQuery(this).length>0;};