I already know how to check elements that are there when the document is ready:
jQuery.fn.exists = function () {
return jQuery(this).length > 0;
}
But this method doesn’t know elements that are added with AJAX. Does anybody know how to do that?