The following step would be to click on a person in this list and retreive all the blog posts this person has writen.
As you could see, i call the following function for this: #postsFromAuthors"
Which uses the following Javascript:
Code:
function postsFromAuthors(id){ //Alle posts ophalen van de geselecteerd author
var output='<ul data-role="listview" data-filter="true">';
$.getJSON('http://bloggingaboutoracleapplications.org/?json=get_author_posts&id=' + id + '&callback=?',
function (data) {
$.each(data.posts,function(key,val) {
var tempDiv = document.createElement("tempDiv");
tempDiv.innerHTML = val.excerpt;
$("a",tempDiv).remove();
var excerpt = tempDiv.innerHTML;
output+='<li>';
output+='<a href="#blogpost" onclick="showPost(' + val.id + ')">';
output+='<h3>' + val.title + '</h3>';
output+='<p>' + excerpt + '</p>';
output+='</a>';
output+='</li>';
output+='</ul>';
$('#listFromAuthor').html(output);
}); //Go through each post
});
}
And the corresponding HTML:
Code:
<div data-role="content" id="listFromAuthor">
Attempting to load the blogposts of the selected author, please wait...<br><br> If this does not happen, please try reloading the page.
</div> <!-- Hier komen de author posts door het script onderaan de pagina. -->
That's probably a CSS problem. If you look at the generated source of the page (View -> Page Source), you'll probably spot the difference between the two lists quickly.
Great wit and madness are near allied, and fine a line their bounds divide.
Bookmarks