title: Jquery ajax url request/load 10 times and request/load 10 more on scroll
body: <p>I'm sending over 140 AJAX requests. The problem is that making 140 requests freezes the browser. </p>
  
  <p>To fix this I want to make 10 requests and then on page scroll request 10 more. </p>
  
  <pre><code>
      var url = "https://xxxxxxx.com/search?name=" + searchWord + "&amp;xxxs=" + duck + "&amp;format=application/json";
      jQuery.ajax({
        url: url,
        beforeSend: function() {
          jQuery('#image').show();
        },
        complete: function() {
          jQuery('#image').hide();
        },
        dataType: "text",
        success: function(data) {}
      });
  
  </code></pre>
  
  <p>I have tried this code:</p>
  
  <pre><code>var currentPageNumber = 1;
      loadMore(currentPageNumber);
  $(window).scroll(function() {
  
      if($(window).scrollTop() ==  $(document).height()- $(window).height())
      {
  
          loadMore(currentPageNumber);
          currentPageNumber +=1;
      }
    });
  function loadMore(currentPage){
          $.ajax({})
  }
  
  </code></pre>