title: How to get content from a <li> and place it in a jQuery array
body: <p>I'm trying to get the content of a list and place it in an array. As a result I get a list of numbers instead of the content its self. Any ideas how I can place the content in the array instead?</p>
  
  <pre><code>var ar = [];
  
  
  $('.div-holder .tab-inner').each(function(){
  
    var createList = (ar.push($(this.innerHTML).text()));
    console.log(createList);
  
  });
  
  &lt;div class="div-holder"&gt;
  
  
  &lt;ul&gt;&lt;li class="tab-alpha"&gt;&lt;a href="/promotions/half-term-activities/#"&gt;&lt;span class="tab-outer"&gt;&lt;span class="tab-inner"&gt;Beverley&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="tab-beta"&gt;&lt;a href="/promotions/half-term-activities/#"&gt;&lt;span class="tab-outer"&gt;&lt;span class="tab-inner"&gt;Driffield&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="tab-gamma"&gt;&lt;a href="/promotions/half-term-activities/#"&gt;&lt;span class="tab-outer"&gt;&lt;span class="tab-inner"&gt;Francis Scaife&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="tab-delta"&gt;&lt;a href="/promotions/half-term-activities/#"&gt;&lt;span class="tab-outer"&gt;&lt;span class="tab-inner"&gt;Goole&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="tab-epsilon tab-selected"&gt;&lt;a href="/promotions/half-term-activities/#"&gt;&lt;span class="tab-outer"&gt;&lt;span class="tab-inner"&gt;Haltemprice&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="tab-zeta"&gt;&lt;a href="/promotions/half-term-activities/#"&gt;&lt;span class="tab-outer"&gt;&lt;span class="tab-inner"&gt;Hornsea&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="tab-eta"&gt;&lt;a href="/promotions/half-term-activities/#"&gt;&lt;span class="tab-outer"&gt;&lt;span class="tab-inner"&gt;South Cave&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li class="tab-theta"&gt;&lt;a href="/promotions/half-term-activities/#"&gt;&lt;span class="tab-outer"&gt;&lt;span class="tab-inner"&gt;South Holderness&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li class="tab-iota"&gt;
  &lt;a href="/promotions/half-term-activities/#"&gt;
  &lt;span class="tab-outer"&gt;
  &lt;span class="tab-inner"&gt;Withernsea&lt;/span&gt;
  &lt;/span&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>Here is a link to the issue <a href="https://jsfiddle.net/ryadkhhp/4/" rel="nofollow">https://jsfiddle.net/ryadkhhp/4/</a></p>