[jQuery] Re: RSS Feed Aggregator with $.ajax

2009-02-02 Thread anthonyb

Curious if I could get some more input on weather or not this script
is written correctly..

thanks

On Jan 31, 9:59 pm, anthonyb anthonybr...@gmail.com wrote:
 Hi Richardo,

 Thanks for the help, ive been messing around with what you provided
 and cant seem to get it running..

 Anything im doing wrong?


[jQuery] Re: RSS Feed Aggregator with $.ajax

2009-01-31 Thread anthonyb

Ive been editing this a little bit and thought that what i have below
would work. but it doesn't.

$(function() {

$.ajax({
type: GET,
url: http://anthonyjamesbruno.com/blog/?feed=rss2;,
dataType: xml,
success: function(rss) {
strRSS = h4 + $(/rss/channel/title,rss).text() + /
h4;
$(/rss/channel/item/title:lt(5),rss).each(function(i) {
strRSS += li onClick='location.href=';
strRSS += $(/rss/channel/item/link:eq( + i +
),rss).text();
strRSS += ';';
strRSS += $(this).text();
strRSS += br /;
strRSS += ($(/rss/channel/item/description:eq( + i +
),rss).text()).substring(0,200) + .../li;
});
$(#feed_me).html(strRSS);
}
});

});


[jQuery] Re: RSS Feed Aggregator with $.ajax

2009-01-31 Thread Ricardo Tomasi

Is that actually working? XPath selectors are not supported in jQuery
anymore.

Make it simple:

$(function() {

$.ajax({
type: GET,
url: http://anthonyjamesbruno.com/blog/?feed=rss2;,
dataType: xml,
success: function(rss) {
   strRSS = h4 + $(/rss/channel/title,rss).text() + /h4;
$(/rss/channel/item:lt(5),rss).each(function(i) {
   var t = $(this),
   link = t.find('link'),
   title = t.find('title'),
   description = t.find('description').text().substring
(0,200);
$('li/')
  .click(function(){ window.location.href = link })
  .append( title + 'br /' +
description )
  .appendTo('#feed_me');
  });
   }
});


On Jan 31, 7:51 pm, anthonyb anthonybr...@gmail.com wrote:
 Ive been editing this a little bit and thought that what i have below
 would work. but it doesn't.

 $(function() {

     $.ajax({
         type: GET,
         url: http://anthonyjamesbruno.com/blog/?feed=rss2;,
         dataType: xml,
         success: function(rss) {
             strRSS = h4 + $(/rss/channel/title,rss).text() + /
 h4;
             $(/rss/channel/item/title:lt(5),rss).each(function(i) {
                 strRSS += li onClick='location.href=';
                 strRSS += $(/rss/channel/item/link:eq( + i +
 ),rss).text();
                 strRSS += ';';
                 strRSS += $(this).text();
                 strRSS += br /;
                 strRSS += ($(/rss/channel/item/description:eq( + i +
 ),rss).text()).substring(0,200) + .../li;
             });
             $(#feed_me).html(strRSS);
         }
     });

 });


[jQuery] Re: RSS Feed Aggregator with $.ajax

2009-01-31 Thread anthonyb

Hi Richardo,

Thanks for the help, ive been messing around with what you provided
and cant seem to get it running..

Anything im doing wrong?