Working With Feeds and Lists
- by Nathan Campos
I'm using a ListView component to list up some informations at a RSS feed, but when the user clicks the row, I want to change into a detailed view of that RSS Item, so far I've done this:
function parseFeed(feed) {
var html = "";
for(var i = 0; i < feed.items.length && i < 5; i++) {
var item = feed.items[i];
var title = item.title;
html += "\n<li onClick='goDetailed()'>\n";
html += "<h3><a href='#' class='ui-link-inherit'>" + title + "</a></h3>\n";
html += "<p>" + item.description + "</p>\n";
html += "</li>";
}
$("#dList").append(html);
$("#dList").listview('refresh');
}
function goDetailed() {
$.mobile.changePage($('#detailedPage'));
}
One of my problems is that the Back button won't come back(it does nothing). My other question is how I can pass the item.title, item.description, item.link and item.updated of the selected row(feed item) to some <div data-role="content">'s at the detail page.