Check if element exists within DIV
<p>I want to, on click, move an element inside a div unless it's already inside it. I was thinking something like...</p>

<p>Click tag > If element is in div do nothing > Else move element into div</p>

<p><a href="http://jsfiddle.net/establish/Xhhe8/" rel="nofollow">http://jsfiddle.net/establish/Xhhe8/</a></p>

<p><strong>HTML</strong></p>

<pre><code>&lt;ul&gt;
  &lt;li&gt;&lt;a href="#" class="tag"&gt;Art&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#" class="tag"&gt;Computing&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#" class="tag"&gt;Design&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div id="crate"&gt;
&lt;/div&gt;
</code></pre>

<p><strong>jQuery</strong></p>

<pre><code>$('.tag').on('click', function(event) {

if ($('#crate').has(this)) {
    // do nothing
}

else {

    $(this).appendTo('#crate');
}
});
</code></pre>

<p>It doesn't work. Also not sure how to represent 'do nothing', usually I just use a singular IF statement so no need to represent it. Can I do this to 'do nothing' and disable the click?</p>

<pre><code>$(this).off(); 
</code></pre>
