title: why filter function not working on li?
body: <p><a href="https://plnkr.co/edit/Hcdp24jLgdlOv2NlqyIG?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/Hcdp24jLgdlOv2NlqyIG?p=preview</a></p>
  
  <p>Hi</p>
  
  <p>I am trying to filter my <code>li</code> using <strong>only</strong> filter function.I have one button (filter text).When I click on button I want to show only that <code>li</code> which have class <code>abc</code>.I tried like this</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width"&gt;
      &lt;script src="https://code.jquery.com/jquery-2.0.3.js"&gt;&lt;/script&gt;
      &lt;style&gt;
          ul {
              list-style: none;
              cursor: pointer;
  
          }
  
          .tabItem li {
              float: left;
              padding: 20px;
          }
  
          .tabItem li.active {
              color: red;
          }
  
          .clear {
              clear: both;
          }
  
          .hideDiv{
              display: none;
          }
  
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  
  &lt;button class="filter"&gt;filler&lt;/button&gt;
  &lt;ul class="item"&gt;
      &lt;li class="äbc"&gt;123&lt;/li&gt;
      &lt;li class="pp"&gt;12&lt;/li&gt;
      &lt;li class="äbc"&gt;78&lt;/li&gt;
      &lt;li class="äc"&gt;13&lt;/li&gt;
  &lt;/ul&gt;
  &lt;script&gt;
      $(function () {
  
  
          $('.filter').click(function () {
              var $items = $('.item li');
              //$items.hide().filter(filterClasses.join('')).show();
              var $newItem =$items.filter(function (i,item) {
                  console.log(i)
                  console.log(item)
                  return $(item).hasClass('abc')
              })
              $($newItem).show();
          });
  
      });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Expected output</strong></p>
  
  <pre><code>123
  
  78
  </code></pre>