Can someone who has done this give me a hand? I am trying to manually append these "chat1" list elements to a list "allChats1".
All I seem to be accomplishing is writing only one to the list. I am confident that the problem persists in the appendTo logic, as I am correctly creating list elements and setting their IDs uniquely.
Code: Select all
for(var i = 0; i < this.cache[0].length; i++){
var div = Appery("chat1");
div.attr("id",currentPage+"_chat1_"+i);
div.find(Appery("messageID")).text(this.cache[0][i]._id);
div.find(Appery("buyerName")).text(this.cache[0][i].user_name);
div.find(Appery("productID")).text(this.cache[0][i].productID);
div.appendTo(Appery("allChats1"));
}