jquery add and remove class problem
<p>I'm trying to bind a function with a non-existent class. I will try to explain</p>

<p>my js:</p>

<pre><code>function hidelink()
{
        $('#user_form').hide();
        $('.selected').text("New User").removeClass('selected').addClass('unselected');
        return false;

}
function showlink()
{
        $('#user_form').show();
        $('.unselected').text("Hide it").removeClass('unselected').addClass('selected');    
        return false;

}
$(function(){
    $('#user_form').hide();
    $('.unselected').click(showlink);       
    $('.selected').click(hidelink);
}); 
</code></pre>

<p>my html:</p>

<pre><code>&lt;div id="user_form"&gt;
 &lt;a href="/foobar" class="unselected"&gt;My Link&lt;/a&gt; 
&lt;/div&gt;
</code></pre>

<p>So basically, when you click in the link it will change the classes (selected/unselected) and hide/show a div. The problem is that, when i click once, it shows the form, but if i click again in the link, the form don't hides again. Maybe because i'm biding the events when the page loads and at this time there is not element that match the selector ".selected".. makes sense?</p>
