title: Get Id or Name of each li in ul with jquery
body: <p>I want to get id and text name of each li in ul using jquery </p>
  
  <p>I have tried this but it didn't work</p>
  
  <pre><code>&lt;ul id="tags1"&gt;
      @foreach (var item in Model.Tags)
      {             
          &lt;li id=@item.TagName &gt;@item.TagName&lt;/li&gt;    
      }    
  &lt;/ul&gt;
  </code></pre>
  
  <p>I have tried this code but it gave me a lot or html</p>
  
  <pre><code>$('#tags1 li').each(function (i) {
      alert($(this).html());
      console.log($(this).html());
  });
  </code></pre>
  
  <p>It gave me that </p>
  
  <pre><code>&lt;span class="tagit-label"&gt;Art&lt;/span&gt;&lt;a class="tagit-close"&gt;&lt;span class="text-icon"&gt;×&lt;/span&gt;&lt;span class="ui-icon ui-icon-close"&gt;&lt;/span&gt;&lt;/a&gt;&lt;input type="hidden" style="display:none;" value="Art" name="tags"&gt;
  </code></pre>
  
  <p>I just need to get the value only value="Art"</p>
  
  <p>Thank you</p>