metafizzy / infinite-scroll

📜 Automatically add next page
https://infinite-scroll.com
7.41k stars 1.74k forks source link

InfiniteScroll with post data #925

Closed Neurozone closed 3 years ago

Neurozone commented 3 years ago

Hello. I wish to use infiniteScroll with post parameter data. But as I'm not very good in javascript I need some help Here is my vanilla code:

$.ajax({
  url: '/item/select',
  type: 'post',
  data: {flux: flux, page: $(window).data('page')},

  success: function (data) {
    $('.row').append(data).last();
  }

The code for infiniteScroll seem to be the following:

$('#articles').infiniteScroll({ // options path: '/item/select', append: '.post' });

But where can I send post parameter ? Please help me :)

desandro commented 3 years ago

Sorry, Infinite Scroll only loads content with get.