I am using the following script to load some WordPress posts.
Unfortunately this replaces my content and I would like to append to the existing content.
What is your suggestion on appending using AJAX call.
$('#load-posts a').click(function() {
if(pageNum <= max) {
$('#content').load(nextLink + ' article',
function() {
// Update page number and nextLink.
// Update the button message.
}
}
);
}
});
Thanks
load replaces the content of the parent. One way of doing it is loading content to a new div and than appending it to the element.