title: How to obtain a dynamic JQuery Mobile Accordion?
body: <p>I was trying to design a basic RSS feed reader using PhoneGap and JQuery Mobile. The page loads first and it takes time for the feeds to show up. I'm trying to add an accordion to each post so that the user gets to see the post title and expand the post if interested. This is the snippet i used:</p>
  
  <pre><code>for (var i = 0; i &lt; result.feed.entries.length; i++) {
      var entry = result.feed.entries[i];
      var title = entry.title,
      link = entry.link,
      description = entry.contentSnippet,
      pubDate = entry.publishedDate;
      feedItem = feedItem + '&lt;div data-role="collapsible" data-theme="a" data-content-theme="a"&gt;&lt;h3&gt;&lt;a href="' + link + '&gt;';
      feedItem = feedItem + '&lt;span class="feeditemtitle"&gt;' + title + '&lt;/span&gt;';
      feedItem = feedItem + '&lt;/a&gt;&lt;/h3&gt;';
      feedItem = feedItem + '&lt;h6&gt;' + pubDate + '&lt;/h6&gt;';
      feedItem = feedItem + '&lt;p&gt;' + description + '&lt;/p&gt;&lt;/div&gt;';
  }
  </code></pre>
  
  <p>I am able to get the posts on the page but there is no accordion. It renders the posts as plain HTML. I assume it is because the posts load <em>after</em> the page is loaded. Can anyone please help me with this?</p>