title: jQuery: Append new object to DIV and act on that new object
body: <p>I have a question that must be common but I dont know it.</p>
  
  <p>If I append something (lets say SPAN) to a DIV, how can I act on that new SPAN at the same time?</p>
  
  <pre><code>function makeRotatable($clone) {
      $($clone).before('&lt;span style="height:200px;"&gt;&lt;/span&gt;').slider({
              orientation: "vertical",
              range: "min",
              min: 0,
              max: 100,
              value: 60,
              slide: function( event, ui ) {
                  $( "#amount" ).val( ui.value );
              }
          });
  
  }
  </code></pre>
  
  <p>What I want to do is act on that newly appended SPAN. But the slider is acting on the $clone instead. What am I doing wrong?</p>
  
  <p>Thanks!</p>