title: How to solve "TypeError: $(...).length is not a function"?
body: <p>My code is like this :</p>
  
  <pre><code>$(document).ready(function () {
      size_li = $("#myList li").length();
      x=3;
      $('#myList li:lt('+x+')').show();
      $('#loadMore').click(function () {
          x= (x+5 &lt;= size_li) ? x+5 : size_li;
          $('#myList li:lt('+x+')').show();
      });
      $('#showLess').click(function () {
          x=(x-5&lt;0) ? 3 : x-5;
          $('#myList li').not(':lt('+x+')').hide();
      });
  });
  </code></pre>
  
  <p>Or see demo and full code here : <a href="http://jsfiddle.net/oscar11/6FzSb/4177/" rel="noreferrer">http://jsfiddle.net/oscar11/6FzSb/4177/</a></p>
  
  <p>I use jquery 3.0.1</p>
  
  <p>When executed, there exist error :</p>
  
  <p>TypeError: $(...).length is not a function</p>
  
  <p>How can I solve it?</p>