title: how get last tag test via jquery
body: <p>I want to get last button text via JQuery. You can see my html tag and js code which I have tried but not result.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div id="pagedata"&gt;
     &lt;ul id="paginationIda"  class="pagination"&gt;
          &lt;li&gt;&lt;button type="button" class="btn btn-default"&gt;1&lt;/button&gt;&lt;/li&gt;
          &lt;li&gt;&lt;button type="button" class="btn btn-default"&gt;2&lt;/button&gt;&lt;/li&gt;
          &lt;li&gt;&lt;button type="button" class="btn btn-default"&gt;3&lt;/button&gt;&lt;/li&gt;
      &lt;/ul&gt;
   &lt;/div&gt; 
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code> var lastli =   $('#paginationIda li:last-child').val();
  </code></pre>