title: Auto complete pushes other div down. Need help to make a scroll auto complete
body: <p>I have a input box that has autocomplete however suppose there are 100 entries that match the value it displays all and pushes other div all the way down. I need help on how to make a like display up to 5 only then make it possible to scroll to other values. Hopefully all I need to change is in the css part.</p>
  <p>Here is my input box. Note this is inside a table:</p>
  <pre><code>&lt;input type='text' id='text_lot_number' name='text_lot_number'&gt;
  &lt;div class=&quot;results results_lot_number&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>Then here is my script part. This is inside document.ready:</p>
  <pre><code>$(&quot;#text_lot_number&quot;).keyup(function() {
      var keyword = $(&quot;#text_lot_number&quot;).val();
      if (keyword.length &gt;= MIN_LENGTH) {
          $.get( &quot;autocomplete.php&quot;, { keyword: keyword, method: 'LOTNUM' } )
          .done(function( data ) {
              $('.results_lot_number').html('');
              var results = jQuery.parseJSON(data);
              $(results).each(function(key, value) {
                  $('.results_lot_number').append('&lt;div class=&quot;item&quot;&gt;' + value + '&lt;/div&gt;');
              });
              $('.item').click(function() {
                  var text = $(this).html();
                  $('#text_lot_number').val(text);
                  $('.results_lot_number').hide();
              });
              $('.results_lot_number').show();
          });
      } 
      else {
          $('.results_lot_number').html('');
      }
  });
  </code></pre>
  <p>autocomplete.php just contains the suggestion in array. For simplified form let's use this:</p>
  <pre><code>&lt;?php
  $aryAutoComplete = array(&quot;Test1&quot;,&quot;Test2&quot;,&quot;Test3&quot;,&quot;Test4&quot;);
  echo json_encode($aryAutoComplete);
  </code></pre>
  <p>This is what it looks like: <br>
  <a href="https://i.stack.imgur.com/02OIY.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/02OIY.jpg" alt="This is what it looks like" /></a></p>