[英]Why won't my jQuery Feeds plugin work?
这个插件应该在jQuery中显示RSS feed,但是在docs之后我没有得到任何输出。
HTML:
<div id="feeds"></div>
jQuery的
$('#feeds').feeds({
feeds: {
feed1: 'http://rollingstonesofficial.tumblr.com/rss'
}
});
它在起作用: http : //jsfiddle.net/XmY9d/30/
有没有我想念的东西?
更新1
谢谢你们的回答。 我应该说这个问题也在Chrome扩展程序中本地发生。
更新2
这些是我在控制台中得到的错误:
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".
Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".
两者都发生在第17行的jquery.feeds.min.js中。
您无法从raw.github.com
中的jsFiddle
加载文件。
因此,您可以使用以下方法,而不是通过原始的Github包含插件:
<script src="http://camagu.github.io/jquery-feeds/jquery.feeds.js"></script>
或者您可以将其直接放在Javascript
面板中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.