title: jQuery - Animate object that has been given a random id
body: <p>I want to know how I can animate an object that I have assigned a random ID to. </p>
  
  <p>Basically I have a button that creates an "house" in a container. And when I click to create the house, it will append to my container with a random ID and a set CLASS:</p>
  
  <pre><code>$('.Container').append('&lt;div id="'+iRandomId+'" class="House" title="'+sName+'"&gt;&lt;/div&gt;');
  </code></pre>
  
  <p>The Random ID I get like this: </p>
  
  <pre><code>var iRandomId = GetRandomNumber(999999, 99999999999);
  oObject.setId(iRandomId);
  
  function GetRandomNumber(iMinNumber, iMaxNumber)
  {
  return  Math.floor(Math.random()* iMaxNumber +iMinNumber);      
  }  
  </code></pre>
  
  <p><strong>Animation:</strong> I can easily animate the object by calling the class. But if I create more than one House they will of course all animate.. </p>
  
  <pre><code>setTimeout(function(){
  $('.House').effect('bounce');
  }, 0, function(){
  </code></pre>
  
  <p>The annimation is triggered when another object is dragged on top of my house (which is droppable). What I need for my jQuery is to somehow check the ID of the specific house that the object is dragged on to. And then only animate that house. </p>