Custom jquery RSS feed plugin with micro-template

守給你的承諾、 提交于 2020-01-06 02:41:09

问题


I'm trying to make an rss feed plugin so i can get images or whichever node i want. As far as i know, most feed plugins use the Google feed api that you can select predefined nodes and not custom ones.

To overcome cross domain policy i'm using YQL to get the rss feed. You can see the working code:

http://jsfiddle.net/DTZ4g/4/

Overall it's working nicely but i want to add templates so it would be customizable outside the plugin. I'm using John Resig's Micro templating engine but i can't get it to work.

http://jsfiddle.net/DTZ4g/5/

Any ideas?

Also right now i'm passing the result like this: return $('.results').append(tmpl(settings.template)); Instead of declairing .result selector inside the plugin i want to just return it where its been called

(".results").feeder({..});

Thanks

来源:https://stackoverflow.com/questions/23757090/custom-jquery-rss-feed-plugin-with-micro-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!