listview not working in jQuery mobile
<p>I'm trying to fetch the feeds dynamically from some source and then i wanted to display each of the link in form of list  in jQuery mobile . I'm able to fetch the feeds but they are displaying normally even tough i had kept <code>data-role="listview"</code> and <code>unorderedlist.listview('refresh')</code>.</p>

<p><img src="http://i.stack.imgur.com/T1zou.jpg" alt="enter image description here">
Below is the code</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page Title&lt;/title&gt;
&lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" /&gt;
&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"&gt;&lt;/script&gt;
&lt;style type="text/css"&gt;
.nstyle
{
data-role:listview;
list-style:none;
}

&lt;/style&gt;

 &lt;script&gt;
  $(document).ready(function(){

      $("#toi").rssfeed("http://timesofindia.feedsportal.com/c/33039/f/533974/index.rss",{limit:5,date:false,header:false,content:false});

  });
  &lt;/script&gt;


&lt;script type="text/javascript"&gt;

(function($){



    var current=null;
    $.fn.rssfeed=function(url,options){
        var defaults={limit:10,header:true,titletag:'h4',date:true,content:true,snippet:true,showerror:true,errormsg:'',key:null};
        var options=$.extend(defaults,options);
        return this.each(function(i,e){var $e=$(e);
        if(!$e.hasClass('rssFeed'))$e.addClass('rssFeed');
        if(url==null)return false;
        var api="http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&amp;callback=?&amp;q="+url;
        if(options.limit!=null)
            api+="&amp;num="+options.limit;
        if(options.key!=null)api+="&amp;key="+options.key;
        $.getJSON(api,function(data)
                {if(data.responseStatus==200)
        {_callback(e,data.responseData.feed,options);
        }
        else{
            if(options.showerror)
if(options.errormsg!='')
{
    var msg=options.errormsg;
    }else
    {
        var msg=data.responseDetails;
        };
        $(e).html('&lt;div"&gt;&lt;p&gt;'+msg+'&lt;/p&gt;&lt;/div&gt;');};});});};

        var _callback=function(e,feeds,options){if(!feeds){return false;
        }
var html='';
var row='odd';
if(options.header)
html+='&lt;div&gt;'+'&lt;a href="'+feeds.link+'" title="'+feeds.description+'"&gt;'+feeds.title+'&lt;/a&gt;'+'&lt;/div&gt;';
html+='&lt;div&gt;'+'&lt;ul id="tst"&gt;';
for(var i=0;i&lt;feeds.entries.length;i++)
{var entry=feeds.entries[i];
var entryDate=new Date(entry.publishedDate);
var pubDate=entryDate.toLocaleDateString()+' '+entryDate.toLocaleTimeString();
html+='&lt;li class="rssRow '+row+'"&gt;'+'&lt;'+options.titletag+'&gt;&lt;a  href="'+entry.link+'" title="View this feed at '+feeds.title+'"&gt;'+entry.title+'&lt;/a&gt;&lt;/'+options.titletag+'&gt;'
if(options.date)html+='&lt;div&gt;'+pubDate+'&lt;/div&gt;'
if(options.content)
{if(options.snippet&amp;&amp;entry.contentSnippet!=''){var content=entry.contentSnippet;
}else{var content=entry.content;
}

html+='&lt;p&gt;'+content+'&lt;/p&gt;'}
html+='&lt;/li&gt;';if(row=='odd'){row='even';}else{row='odd';}}
html+='&lt;/ul&gt;'+'&lt;/div&gt;'

$(e).html(html);
$("#tst").addClass('nstyle');
$("#tst").listview('refresh');
        };

        })(jQuery);
&lt;/script&gt;





&lt;/head&gt;
&lt;body&gt;
&lt;div data-role="page" id="home" data-theme="e"&gt;
 &lt;div data-role="header" &gt;
  &lt;h1&gt;Times Of India&lt;/h1&gt;
 &lt;/div&gt;
 &lt;div data-role="content" id="toi"&gt;
 content here
 &lt;/div&gt;
 &lt;div data-role="footer"&gt;
  &lt;h4&gt;Top News&lt;/h4&gt;
 &lt;/div&gt;
&lt;/div&gt;


&lt;/body&gt;
&lt;/html&gt;
</code></pre>
