Working With Feeds and Lists
Posted
by
Nathan Campos
on Stack Overflow
See other posts from Stack Overflow
or by Nathan Campos
Published on 2011-06-30T01:43:16Z
Indexed on
2011/06/30
16:22 UTC
Read the original article
Hit count: 248
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.
© Stack Overflow or respective owner