How to place this RSS feed in jQuery view?

Ok, I found this RSS plugin and I want to display it on a web page, but I want it to be in a jQuery list, so each item is a list item, can someone explain to me how to do this? I set the jsfiddle link below! Thanks
http://jsfiddle.net/8qhZP/
And this is the actual source where I found the plugin
http://www.jquery4u.com/plugins/jquery-rss-feed-display-live/

+5
source share
3 answers

The easiest way to achieve this is to get the RSS feed converted to a JSON object. This way you can invoke the URL using JSONP and then parse the output using the jQuery template engine.

1) Convert RSS feed to JSON feed using Yahoo pipes (you can also combine RSS feeds)

http://jquery4u.com/rss/

at

Yahoo JSON Pipe Output

2) Send JSON feed using jQuery template engine like json2html

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://json2html.com/js/jquery.json2html-2.5-min.js"></script>

<script type="text/javascript">
var transform = {tag:'li',children:[
                    {tag:'a',src:'.link',html:'.title'},
                    {tag:'br'},
                    {tag:'span',html:'.description'}
                ]};

$.getJSON("http://pipes.yahoo.com/pipes/pipe.run?_callback=?", {"_id":"f5e0edec7594378e719cf18c53f8a26c","_render":"json"}, function(data){
    $('#rssFeed').json2html(data.value.items,transform);
});   
</script>

<ul id='rssFeed'></ul>
+3
source

If you are not forced to use the jquery feed rss live plugin , you specify, then you can use this other plugin : analyze RSS using jQuery.

stackoverflow: rss jquery .

, , - :

   jQuery.getFeed({
      url: 'your url',
      success: function(feed) {
         //append your list element and then refresh the list
         $('#myList').append('<li>'+feed.title+'</li>');
         $('#myList').listview('refresh');
      }
   });

, .

+2

RSS, -, . , , :

newsfeed.setentrycontainer("p");

, html.

jQuery ( ?), , jQuery list , RSS-, .

!

0

All Articles