簡體   English   中英

為什么我的jQuery Feeds插件不起作用?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM