jQuery id and class selector after changing class
<p>I am new to this forum and also fairly new to jQuery so it is (as I think) a basic question but I could not find the answer and everything I tried did not work.</p>

<p>I have a button on a page that should do certain things and change the class. And with the new class revert those things.</p>

<p>This is the code:</p>

<pre><code>    $("#info_button.buttonOff").click(function() {
    $(".content").slideUp(300, function() {
        $("#info").slideDown(300);
        $("#info").addClass("contentOn");
        $("#info_button").removeClass("buttonOff").addClass("buttonOn");
        $("#overlay").fadeIn(300);
    });
});

$("#info_button.buttonOn").click(function() {
    $(".content").slideUp(300);
    $("#info").removeClass("contentOn");
    $("#info_button").removeClass("buttonOn").addClass("buttonOff");
    $("#overlay").fadeOut(300);
});
</code></pre>

<p>The first event alone work. But as soon as I add the second event nothing works anymore. I think I have to do something with .unbind() but could not figure out how.</p>

<p>Please help.</p>
