+
`+ response.collection.items[i].data[0].title + `
+
` + response.collection.items[i].data[0].description + `
+
+ `;
+ if (((i+1) % 4) == 0) {
+ addString += ``;
+ }
+ }
+ $('#results').html(addString);
+ if (lastIndex != -1) {
+ $('#loadMore').html(`
+ Load More
+
`);
+ }
+ }
+ });
+}
+
+function loadMore() {
+ var addString = '';
+ var limit;
+ var response = lastResult;
+ var showButton = true;
+
+ if (response.collection.items.length < (lastIndex + 1)) {
+ limit = (lastIndex + 1)
+ showButton = false;
+ } else {
+ if (response.collection.items.length < (lastIndex + 13)) {
+ limit = response.collection.items.length - 12;
+ showButton = false;
+
+ } else {
+ limit = (lastIndex + 12);
+ }
+ }
+
+ for (i=(lastIndex + 1);i
+
+
+
`+ response.collection.items[i].data[0].title + `
+
` + response.collection.items[i].data[0].description + `
+
+ `;
+ if (((i+1) % 4) == 0) {
+ addString += `