2016-10-28 62 views
0

我有一个脚本无限滚动这与jquery 1.8.3构建,但它不能在使用jquery 3.1.1的站点上工作,我需要这个脚本来开始使用3.1.1,因为我的站点引导模式使用3.1.1,我不能删除3.1.1。 这里是应用让jquery 1.8脚本使用jquery 3.x

$(document).ready(function(){ 
    $('#content').infinitescroll({ 
     navSelector: "#next:last", 
     nextSelector: "#next:last", 
     itemSelector: "#content", 
     debug: false, 
     dataType: 'html', 
    maxPage: 6, 
     path: function(index) { 
      return "index" + index + ".html"; 
     } 
     // appendCallback : false, // USE FOR PREPENDING 
    }, function(newElements, data, url){ 
     // used for prepending data 
     // $(newElements).css('background-color','#ffef00'); 
     // $(this).prepend(newElements); 
    }); 
}); 

和JS类就设在这里 http://www.hongkiat.com/blog/infinite-page-scroll/

回答

1

jQuery的无冲突()已经解决了这个问题