My "toggle class" javascript is not working
<p>I am using this little script to toggle classes of an element on click of another element. Here is the stripped down code:</p>

<pre><code>//Toggle comments
function togglecomments() {
    function shiftcomments() {
        var comments = document.getElementsByTagName('aside')[0];
        if(comments.className = "hide"){comments.className = "show";}
        else{comments.className = "hide";};
    }
    var commenttoggle = document.getElementById('toggle-comments');
    bindEvt(commenttoggle, "click", shiftcomments);


}
bindEvt(window, "load", togglecomments);
</code></pre>

<p>The thing is it works once, but after that on click the class does not toggle anymore. For those interested here is the event handler I use: <a href="http://pastebin.com/md3dPvMJ" rel="nofollow">http://pastebin.com/md3dPvMJ</a> (It worked fine before so it shouldn't be the problem.)</p>

<p>Any ideas what I did wrong?</p>

<p>Thanks for your feedback guys!</p>
