Guest User

Untitled

a guest
Jul 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function loadMore() {
  2. start += 10;
  3. var nextlink = $("#nav tr td:last a").attr('href');
  4. var currenturl = window.location;
  5. url = currenturl + '&start=' + start;
  6. $("#tempresults").load(url + ' #res');
  7. $("#tempresults").attr('id', 'oldtemp');
  8. $('<div id="tempresults" class="moreloaded"></div>').insertAfter(".moreloaded:last");
  9. }
  10.  
  11. $(document).ready(function() {
  12. $(window).scroll(function(){
  13. if ($(window).scrollTop() == $(document).height() - $(window).height()){
  14. loadMore();
  15. }
  16. });
  17.  
  18. start = 0;
  19.  
  20. $('<div id="tempresults" class="moreloaded"></div>').insertAfter("#res");
  21. });
Add Comment
Please, Sign In to add comment