title: jQuery addClass() to element generated after append()
body: <p>I am trying to add a class to a newly appended DIV without using something like:</p>
  
  <pre><code>t.y.append('&lt;div class="lol'+i+'"&gt;&lt;/div&gt;');
  </code></pre>
  
  <p>Here's a better example of what I'm trying to do:</p>
  
  <pre><code>var t = this;
  
  $(this.x).each(function(i, obj) {
      //append new div and add class too &lt;div&gt;&lt;/div&gt;
      t.y.append('&lt;div&gt;&lt;/div&gt;').addClass('lol'+i);
  });
  </code></pre>
  
  <p>Page load HTML looks like:</p>
  
  <pre><code>&lt;div class=".slideButton0 .slideButton1 .slideButton2" id="sliderNav"&gt;
      &lt;div&gt;&lt;/div&gt;
      &lt;div&gt;&lt;/div&gt;
      &lt;div&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>