I am trying to use Backbone.Paginator.js
to run more than one app (multiple instances of paginator) on the same page.
I created a test page. (Navigate to backbone.paginator/examples/netflix-infinite-paging
).
I left the code as is for app.js
and create app2.js
, which is a clone of app.js
but all the javascript code is located in one file and the app has been renamed to app2.
Two instances work on first load of the page but subsequent request/refreshes only load app2.js's data.
Is it possible to run multiple instances on the same page?
- I am interested in using an auto-paging (infinite/endless scroll) so
I tried to use Paul Irish's
jQuery Infinite Scroll plugin
but I am unable to get it to work. - I am initiating the plugin to run on document ready (which does not work, as expected), but also running the code in the app2's ResultView, which does not work as well.
Any ideas on how to get an auto-paging infinite scroll solution?
- I ran into https://github.com/joneath/infiniScroll.js but I am not sure how to integrate it with Backbone.Paginator.js.
- I am still learning and any help would be greatly appreciated! :)
UPDATE: After further testing across different browsers, it seems like the problem might be to caching issue/differences. For example, in Safari, it works sometimes (randomly) when refreshing the page. I am not sure how to debug that. Any ideas?
<script src="backbone.js?v=1"></script>
– Sophisticate