title: Wrapping comma-separated items with divs in jQuery
body: <p>How do I split a string in jQuery by commas, wrap each item in a div, and then convert it back to a string?</p>
  
  <p>I've got a solution which almost works, however it prefaces each string with "undefined".</p>
  
  <pre><code>var tags = item.tags.split(',');
  var taglist;
  $.each(tags, function(t, tag){
      taglist += "&lt;div class='tag'&gt;" + tag + "&lt;/div&gt;";
  });
  </code></pre>