jQuery .append Issue
<p>This is my code:</p>

<pre><code>$('.add').click(function(){
    $('#test').append("&lt;div class='tab selected'&gt;TEST&lt;/div&gt;");
});
$('.tab').click(function(){
    $('.tab').removeClass('selected').addClass('unselected');
    $(this).removeClass('unselected').addClass('selected');
});

&lt;input type='button' value='add' class='add' /&gt;
&lt;div id='test'&gt;
    &lt;div class='tab unselected'&gt;TEST&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>This is my issue:</p>

<p>When I click the <code>.tab</code> div that was already defined in html, the function works fine.
But, if I add another <code>.tab</code> div using the <code>.add</code> input, the function does not work.</p>

<p>What exactly am I doing wrong here?</p>
