jQuery: it addclass, remove class itself?
<pre><code>$(document).ready(function() {    
    $('a#fav').bind('click', function() {
        addFav(&lt;?php echo $showUP["uID"]; ?&gt;);
    });
});


function addFav(id){
    $.ajax({
      url: "misc/favAdd.php",
      data: { id: id},
      success: function(){
           $('a#fav')
                 .addClass('active')
                 .attr('title','[-] Remove as favorite')
                 .unbind('click')
                 .bind('click', removeFav(id))
           ;
                jGrowlTheme('wallPop', 'mono', '[+] Favorit', 'Du har nu lagt till denna profil som favorit', 'images/addFavorit_hover2.png', 1000);
      }
    });
}

function removeFav(id){
    $.ajax({
      url: "misc/favRemove.php",
      data: { id: id },
      success: function(){
            $('a#fav')
                 .removeClass('active')
                 .attr('title','[+] Add as favorite')
                 .unbind('click')
                 .bind('click', addFav(id))
            ;
                            jGrowlTheme('wallPop', 'mono', '[-] Favorit', 'Du har nu tagit bort denna profil som favorit', 'images/addFavorit_hover2.png', 1000);
      }
    });
}
</code></pre>

<p>I have this issue, that when i click on a#fav then it addClass active, and removes it and add and remove and send a bunch of ajax itself.. it goes crazy. 
And i do not want that, i want to have it so when you click a#fav it adds class (send ajax call) and then when you click it again it sends ajax call and removes the class. And it goes on like that..</p>

<p>What have i done wrong?</p>
