jquery addClass doesn't work
<p>the jquery</p>

<pre><code>$(document).on('click', '#fun', function (e) {
    var $this = $(this);
    var request = $.ajax({
      url: "example.php",
      type: "POST",
      data: {bla: blabla},
      dataType: "html"
    });

    request.done(function(msg) {
        if(msg)
        {
            $this.addClass("btn btn-info btn-small marked");
            $("#isMarked", $this).val(msg)
        }
        else if(!msg)
        {
            $this.addClass("btn btn-small unmarked");
            $("#isMarked", $this).val(msg);
        }
    });
</code></pre>

<p>and the button</p>

<pre><code>&lt;a id='fun' class='btn btn-info btn-small marked' href='#'&gt;fun&lt;/a&gt;
</code></pre>

<p>example.php will return a value either 0 or 1 (indicate true or false)
so the msg will be 0 or 1</p>

<p>the addClass in else if(!msg) can't works. I can't find the problem. any idea?</p>
