Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery Wookmark插件无限加载/Scoll_Jquery - Fatal编程技术网

jquery Wookmark插件无限加载/Scoll

jquery Wookmark插件无限加载/Scoll,jquery,Jquery,我在我的网站上使用Wookmark jQuery网格布局 我需要自动加载/无限滚动工作 在本例中,它只是再次加载前10个图像,如何让它继续加载Wookmark.com和Pinterest.com上列表的其余部分 我一直试图更改的代码部分: /** * When scrolled all the way to the bottom, add more tiles. */ function onScroll(event) { // Check if we're within 100 pix

我在我的网站上使用Wookmark jQuery网格布局

我需要自动加载/无限滚动工作

在本例中,它只是再次加载前10个图像,如何让它继续加载Wookmark.com和Pinterest.com上列表的其余部分

我一直试图更改的代码部分:

/**
 * When scrolled all the way to the bottom, add more tiles.
 */
function onScroll(event) {
  // Check if we're within 100 pixels of the bottom edge of the broser window.
  var closeToBottom = ($(window).scrollTop() + $(window).height() > $(document).height() - 100);
  if(closeToBottom) {
    // Get the first then items from the grid, clone them, and add them to the bottom of the grid.
    var items = $('#tiles li');
    var firstTen = items.slice(0, 10);
    $('#tiles').append(firstTen.clone());

    // Clear our previous layout handler.
    if(handler) handler.wookmarkClear();

    // Create a new layout handler.
    handler = $('#tiles li');
    handler.wookmark(options);
  }
};

提前谢谢。我到处看看,尝试了一些不同的东西,但没有运气。干杯。

我刚刚在GitHub存储库中添加了一个示例,详细介绍了如何做到这一点。该示例从WookmarkAPI加载数据,并在页面上显示图像。当您向下滚动并到达底部时,它会加载更多

下面是该示例的直接链接:


让我知道这对您来说是如何实现的。

我刚刚在GitHub存储库中添加了一个关于如何实现这一点的示例。该示例从WookmarkAPI加载数据,并在页面上显示图像。当您向下滚动并到达底部时,它会加载更多

下面是该示例的直接链接:


让我知道这对你有什么好处。

非常感谢!你是一个传奇!正是我想要的。现在我正在研究为JSONP创建一个API!有适合JSONP初学者的好网站吗?开发了JSON,将其改为使用POST获取图像及其控件等。只是想知道GBKS是否注意到它在InternetExplorer8上不起作用?你有这个问题吗?它加载第一部分,但在滚动上没有任何效果。你知道什么办法吗?谢谢你!谢谢你!你是一个传奇!正是我想要的。现在我正在研究为JSONP创建一个API!有适合JSONP初学者的好网站吗?开发了JSON,将其改为使用POST获取图像及其控件等。只是想知道GBKS是否注意到它在InternetExplorer8上不起作用?你有这个问题吗?它加载第一部分,但在滚动上没有任何效果。你知道什么办法吗?谢谢你