jQuery has conditional
<p>Trying to write a conditional with jQuery that basically states, if <code>div.gathering</code> does not contain <code>a.cat-link</code> then do the following. I have tried the following but it doesn't seem to work. Can anyone shed some light on this?</p>

<pre><code>if($("div.gathering:contains('a.cat-link')")){
    $(".gathering").append("&lt;a href='#"+data[i]["categories"][0]["category_id"]+"div' class='cat-link' id='"+data[i]["categories"][0]["category_id"]+"' rel='external'&gt;"+data[i]["categories"][0]["category_name"]+"&lt;br /&gt;");
}
</code></pre>
