title: First click is not working in jquery
body: <p>I am trying to make a seatchart. All seats are elements. I click first seat and after that i click the other one. Second one changed its colour but first one is not working. Why? </p>
  
  <pre><code>function seatObject(id, label, status, token){
      this.id = id;
      this.label = label;
      this.status = status;
      this.token = token;
  }
  
  var seats = [];
  var currentSeat;
  
  function initAll() {
      $(".seatObj").each(function() {
          var id = $(this).attr("id");
          var temp = new seatObject("#" + id, "label" + id, "available", "");
          seats[id] = temp;        
          $("#" + id).click(function () {
              currentSeat = $(this).attr("id");
              if (seats[currentSeat].status == "selected")
              {
                  dequeueSeat();
              }
              else
              {
                  enqueueSeat();   
                  //alert($(this).attr("inkscape:label"));                     
              }
          });
      }); 
  }
  </code></pre>