toggleClass not working
<p>I have a series of links that change content of a span element. I'm trying to toggle the classes on them so that users know which section of a profile they are on. It does not seem to be changing the class though.</p>

<pre><code>&lt;div class="profilemenu" style="background: #e2ecfd; width: 100%"&gt;
   &lt;a style="color: #0b439f;" class="profilemenubutton" id="profile" href="#"&gt;Profile&lt;/a&gt;&amp;nbsp;&amp;nbsp; 
   &lt;a class="profilemenubutton" id="clanactivity" href="#"&gt;Clan Activity&lt;/a&gt;&amp;nbsp;&amp;nbsp; 
   &lt;a class="profilemenubutton" id="recentsessions" href="#"&gt;Recent Sessions&lt;/a&gt;&amp;nbsp;&amp;nbsp; 
   &lt;a class="profilemenubutton" id="progress" href="#"&gt;Progress&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>Jquery script.</p>

<pre><code>$(\'a#profile\').click (function () {
$.ajax({
    type: "GET",
    url: "includes/profile.php?username='.$username.'",
    success: function(msg) {
        $(\'span#info\').html(msg);
        $(\'.active\').toggleClass("profilemenubutton");
        $(this).toggleClass("active");
    }
});
});
</code></pre>
