As single page apps and large scale javascript applications become more prominent on the web, useful resources for those developers who are jumping the ship are crucial.
Hi I am trying to use your infinite scroll but it's loading the first page again and again(on scroll). Here is my collection
var TaskCollection = Backbone.Collection.extend({
load function from my view
loadResults: function () {
var self = this;
this.isLoading = true;
console.log(this.taskCollection.page);
this.taskCollection.fetch({
success: function (models) {
var Len = models.length;
console.log(models.models);
for (var i = 0; i < Len; i++) {
var taskView = new TaskView({
model: models.models[i]
});
self.subViews.push(taskView);
self.$('tbody').append(taskView.render().el);
}
that.isLoading = false;
}
});
},
console.log(this.taskCollection.page); from loadResult gives correct page number. what am I doing wrong?? Thanks in advance
Hi I am trying to use your infinite scroll but it's loading the first page again and again(on scroll). Here is my collection var TaskCollection = Backbone.Collection.extend({
load function from my view loadResults: function () { var self = this; this.isLoading = true; console.log(this.taskCollection.page); this.taskCollection.fetch({ success: function (models) { var Len = models.length; console.log(models.models); for (var i = 0; i < Len; i++) {