title: How to wrap for loop in a div?
body: <p>I have been stuck on this silly thing, I can't figure out how to wrap my for loop inside of a div.      </p>
  
  <pre><code>for (item = 0; item &lt; event.length; item++) {
          var ID = event[item].id;
          element.find(".title").after("&lt;span class='id'&gt;&lt;img src='/avatar/" +ID+ "'/&gt;&lt;/span&gt;");
          }
  </code></pre>
  
  <p>I want to achive this:</p>
  
  <pre><code>&lt;div&gt;
  &lt;span&gt;&lt;/span&gt;
  &lt;span&gt;&lt;/span&gt;
  &lt;span&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Any Help is much apprciated.</p>