title: Loop through an unordered list using Javascript
body: <p>I'm having a bit of a struggle to loop through an unordered list, that is produced by kendo-ui. Looking at its markup, it looks like this:</p>
  
  <pre><code>&lt;ul data-role="listview" data-style="inset" data-type="group" id="unitlist"&gt;
      &lt;li&gt;
          &lt;li&gt;
              &lt;ul&gt;
                  &lt;li id="signalRconveyanceId-P32-HMU-01"&gt;
                      &lt;a href="/UnitDetails/Index/1"&gt;P32-HMU-01
                          &lt;span class="statusicon" style="background-color: #468847"&gt;&lt;/span&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li id="signalRconveyanceId-P32-HMU-02"&gt;
                      &lt;a href="/UnitDetails/Index/2"&gt;P32-HMU-02
                          &lt;span class="statusicon" style="background-color: #b94a48"&gt;&lt;/span&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li id="signalRconveyanceId-XOS-STAGING"&gt;
                      &lt;a href="/UnitDetails/Index/3"&gt;XOS-STAGING
                          &lt;span class="statusicon" style="background-color: #468847"&gt;&lt;/span&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li id="signalRconveyanceId-NWI-100"&gt;
                      &lt;a href="/UnitDetails/Index/4"&gt;NWI-100
                          &lt;span class="statusicon" style="background-color: #"&gt;&lt;/span&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>My javascript looks like this:</p>
  
  <pre><code>var listItems = $("#unitlist li");
  listItems.each(function(li) {
      console.log(li);
  });
  </code></pre>
  
  <p>I can get the rows out of the list allright, but all I get out of them is their index number, which in this case is [0, ..., 6].
  What I really need is to fetch the id-part <code>signalRconveyanceId-XXYY</code> for each list element. How would I be able to do that?</p>