title: Jquery show this number of ul li
body: <p>This is probably a silly question but I googled for hours with no luck..I have some ul li like this:</p>
  
  <pre><code>     &lt;li&gt;&lt;a href="#" class="pa"&gt;..&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="#" class="pa"&gt;..&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="#" class="pa"&gt;..&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="#" class="pa"&gt;..&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="#" class="pa"&gt;..&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>How do I show only a specific set of li? So only 1 to 3 or 1 to 4 and hide the others? I would  like doing this according to a <code>var</code> like:</p>
  
  <pre><code>     var number_of_list = 5; {
              if (some_results &gt; 5)
              {
                  ...'show 5 ul li with jquery'...
  }
  </code></pre>
  
  <p>If that is not possible Then I would like doing this wit an event like:</p>
  
  <pre><code>$(input).keyup(function() {
    number_of_list = 5;
  $(ul li)....show 5 ul li...(which is number_of_list of course) ;
  });
  </code></pre>