I am not that great with JS but I created some code to pull info from an XML file and build out the <article> tags. It work great on the first (main page) but break on the portfolio-infinity-scroll-2.html. Here is the code (don’t laugh), I just change it i=n in the for statement or scroll page(s),
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "xml/photo_albums.xml", true);
xhttp.send();
function myFunction(xml) {
var xmlDoc = xml.responseXML;
var i;
var grouping = xmlDoc.getElementsByTagName("grouping");
for (i = 0; i " + folder +
"" + tag1 +
"   " + tag2 +
"   " + tag3 +
"   " + tag4 +
"";
} else {
itemlist += "" + folder +
"" + tag1 +
"   " + tag2 +
"   " + tag3 +
"   " + tag4 +
"";
}
}
document.getElementById("portfolio").innerHTML = itemlist;
}
And my page URL: http://www.medugno.org/photo_albums.html
Again sorry about the horrible code, but I’m not a JS developer any help would be very much appreciated
