lukeed / bee3d

Support Forum for Bee3D Slider, found @ http://www.lukeed.com/demo/bee3D
MIT License
7 stars 2 forks source link

incremental variable in ajax #49

Open bUxEE opened 7 years ago

bUxEE commented 7 years ago

Hello, I just bought this plugin from codecanyon and I was wondering, how can I set an incremental variable to append to the PATH url? I need this to have my api respond with sequential items and not the same ones every time. Is there a set variable that holds the current fetch number?

lukeed commented 7 years ago

Hi, thanks for your purchase~!

This is a good feature request -- I'll add it in a future release 🎉

In the meantime, you'll have to edit src/scripts/features/ajax/index.js to include this:

fetchNew = function () {
  // these next two lines are different~~~
  var uri = (typeof path === 'function') ? path() : path;
  AJAX.init(uri, function (statusCode, response) { 
    // ...
  });
}

You can then provide a function to the ajax.path option.

Let me know if that works!

bUxEE commented 7 years ago

Thanks!