title: JQuery going through a set of UL and dynamically set ids incremently on each one
body: <p>I have an unordered list which contains several items called 'oListItems' the UL has a class but no id.  </p>
  
  <p>The class OuteroListItems contains many of oListitems </p>
  
  <pre><code> oList.AppendFormat("&lt;ul class='OuteroListItems'&gt;");
              oList.AppendFormat("&lt;li&gt;");
              oList.AppendFormat("&lt;ul class='oListItems'&gt;");
              oList.AppendFormat("&lt;li&gt;" + s.sName + "&lt;/li&gt;");
              oList.AppendFormat("&lt;li&gt;" + s.eName + "&lt;/li&gt;");
              oList.AppendFormat("&lt;li&gt;" + s.SDate + "&lt;/li&gt;");
              oList.AppendFormat("&lt;li&gt;" + s.EDate + "&lt;/li&gt;");
              oList.AppendFormat("&lt;/ul&gt;");
              oList.AppendFormat("&lt;/li&gt;");
              oList.AppendFormat("&lt;/ul&gt;");
  </code></pre>
  
  <p>I want for each .oListItem class that gets retrieved, add dynamically an id to it.</p>
  
  <pre><code> var o = $(".oListItem");
  
      $.each(o, function (){
  
        var f = $(this).attr("id", 'listItem' + i);
  
          i++;
      });
  </code></pre>
  
  <p>wasent sure on the approach, this is what I have so far?</p>