开发者

Reading <media:thumbnail /> tag with jquery

开发者 https://www.devze.com 2023-03-05 23:44 出处:网络
I\'m using jquery to read rss tags and their contents. Accessing simple tags like <title> is pretty simple:

I'm using jquery to read rss tags and their contents. Accessing simple tags like <title> is pretty simple:

$(this).find('title').text();

But the thing is rss feeds have funny tags like:

<media:thumbnail width="66" height="49" url="http://news.bbcimg.co.uk/media/images/52693000/jpg/_52693997_011963628-1.j开发者_如何学编程pg" />

And of course, $(this).find('media:thumbnail'); is not working... Any idea? Thanks in advance!


$('media\\:thumbnail');

it is called name space the colon thingy and you would need to escape the colon because the colon is also used for things like :empty, :checked etc...

0

精彩评论

暂无评论...
验证码 换一张
取 消