title: How can I make a load on scrolling for a table with JS oder JQuery?
body: <p>I want to make a search filter for some json data. Now I think I need a load on scrolling bc if I load like 7'000'000 records the browser crash. I load the JSON in a table because its more user friendly. 
  Like this I create the table.</p>
  
  <pre><code>var obj, dbParam, xmlhttp, myObj, x, txt = "";
  obj = { table: "customers", limit: 20 };
  dbParam = JSON.stringify(obj);
  xmlhttp = new XMLHttpRequest();
  xmlhttp.onreadystatechange = function() {
    if (this.readyState == 4 &amp;&amp; this.status == 200) {
      myObj = JSON.parse(this.responseText);
      // txt += "&lt;table border='1'&gt;"
      // txt += "&lt;tr&gt;&lt;th&gt;Count&lt;/th&gt;&lt;th&gt;Time&lt;/th&gt;&lt;th&gt;Log&lt;/th&gt;&lt;/tr&gt;"
      // txt += "&lt;table id='logs'&gt;"
      // for (x in myObj) {
      //   txt += "&lt;tr&gt;&lt;td&gt;" + myObj[x][1] + "&lt;/td&gt;&lt;td&gt;" + myObj[x][2] + "&lt;/td&gt;&lt;td&gt;" + myObj[x][3] + "&lt;/td&gt;&lt;/tr&gt;";
      // }
      // txt += "&lt;/table&gt;"    
      // document.getElementById("demo").innerHTML = txt;
  
      txt += "&lt;div class=table table--responsive&gt;"
        txt += "&lt;div class=table__wrapper&gt;"
        txt += "&lt;table data-init=auto id='logs'&gt;"
        txt += "&lt;thead&gt;&lt;tr&gt;&lt;th data-type=text&gt;Count&lt;/th&gt;&lt;th data-type=text&gt;Time&lt;/th&gt;&lt;th data-type=text&gt;Log&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;"
        txt += "&lt;tbody&gt;"
        for (x in myObj) {
          txt += "&lt;tr&gt;&lt;td&gt;" +  myObj[x][1] + "&lt;/td&gt;&lt;td&gt;" + myObj[x][2] + "&lt;/td&gt;&lt;td&gt;" + myObj[x][3] + "&lt;/td&gt;&lt;td class=text-align-right&gt;&lt;/tr&gt;";
        }
        txt += "&lt;/tbody&gt;"
        txt += "&lt;/table&gt;"
          txt += "&lt;/div&gt;"  
        txt += "&lt;/div&gt;"    
        document.getElementById("demo").innerHTML = txt;
    }
  };
  xmlhttp.open("GET", JSONPath, true);
  //xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  xmlhttp.send(dbParam);
  </code></pre>
  
  <p>And here is what the JQuery for the search looks like:</p>
  
  <pre><code>$(document).ready(function(){
    $("#site-search").on("keyup", function() {
      var value = $(this).val().toLowerCase();
      $("#logs &gt; tbody &gt; tr").filter(function() {
        $(this).toggle($(this).text().toLowerCase().indexOf(value) &gt; -1)
      });
    });
  });
  </code></pre>
  
  <p>I would be really thankfull for some help.</p>