title: jQuery class selector not selecting after class change
body: <p>Im using Javascript to build a button click and puzzle adventure game. The game will allow a series of button commands. When the "go" command is clicked, the buttons change to different exits, and the class is changed to exit, like so:</p>
  
  <pre><code>function setExitButtons(){
      clearButtons();
      for (var i = 0; i &lt; player.currentRoom.exits.length; i++) {
              var buttoni = button[i];
              buttoni.className = "exit";
              buttoni.innerHTML = player.currentRoom.exits[i].name;
              $(buttoni).show();
      }
  
  }
  </code></pre>
  
  <p>Where clearButtons hides all of the buttons so only the correct ones show, and button[] is the nodelist for the buttons. </p>
  
  <p>The class does change when this function is called. </p>
  
  <p>I then have another jquery function with a class selector, like so:</p>
  
  <pre><code>$(".exit").click(function(){
            //roomchangefunction
  });
  </code></pre>
  
  <p>The .exit function is not activated when the button with exit class is clicked. I have a document ready function encompassing the whole part. Thoughts?</p>