问题
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