How is it possible to run multiple instances using Backbone.Paginator.js?

Questions:
1- Are you including the jQuery Javascript framework dependencies as well in your codebase?
2- I have downloaded the zip file, ran it on Xammp locally and it appears to be a downloaded demo not a test page, can you please confirm which page is your test page from the compressed file attached to your question?
3- Can you create a mockup (in case that there is some server side code happening) in jsfiddle?
4- The link provided for the Infinite scroll jquery plugin is broken, it should be: https://github.com/joneath/infiniScroll.js

If you want to make the jQuery paginator plugin to be independent, you might want to trigger it considering the container element as well

….

From the suggested link, I think that we should experiment with this. Else you might want to create a cookie or something for the browser to remember the changes to the plugin on multiple instances.. Here are some thoughts?

1#

          Backbone.InfiniScroll(collection, **options**)

Instantiate a new InfiniScroll object after your Backbone view has been rendered.

myView = Backbone.View.extend({
  initialize: function(){
    _.bindAll(this, "render");

this.render();
this.infiniScroll = new Backbone.InfiniScroll(this.collection, {success: this.appendRender});

}
)};

2# At a glance from the Options menu

            target: $(window), 

Perhaps we should try:

  $(body).find('#container1'),

-or-

 $(window).children('div').hasClass('container'),

Just some ideas, haven’t experimented it myself-

3# You might want to make (1) to be a javacript function and trigger it based on a class or on it’s id for initializing the scroll over a desired container.

That’s all the ideas I could come up by taking a look real quick, but feel free to reply if it helps out or at least gives some direction.

4# Another thought is that myView can be a variable with an id of a timestamp in Javascript, that way you can ensure uniqueness and since you are calling new then you could have several instances of the plugin running for your view.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)