jQuery test if element exists

jQuery

This is a small plugin for jQuery to test if an element exists in the DOM. 

Code

$('selector').doesExist();

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