添加“manifest_version”行后:2,不起作用jquery.rss.js,错误:未捕获的RefferenceError:$未定义。
popup.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="popup.css" rel="stylesheet" type="text/css" />
<link href="loader.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="jquery.rss.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="popup.js"></script>
</head>
<body>
<span class="menu">
<span><img src="images/home.png" id="url_get_home" title="Main"/></span>
<span><img src="images/update.png" id="url_get_reload" title="Update"/></span>
<span><img src="images/close.png" id="url_get_close" title="Close"/></span>
</span>
<div id="loader">
<img src="images/plugin.png" />
<br /><br />
<script>
jQuery(function($) {
$("#rss_feeds").rss("http://feeds.feedburner.com/..../Vzse", {
limit: 5,
effect: 'slideFastSynced'
})
})
</script>
<div id="rss_feeds"></div>
</div>
</body>
</html>
下面代码的问题,如果你在另一个 *.js 文件中承担它不是一个函数不起作用并且不被调用。
<script>
jQuery(function($) {
$("#rss_feeds").rss("http://feeds.feedburner.com/..../Vzse", {
limit: 5,
effect: 'slideFastSynced'
})
})
</script>
清单.json:
{
"name": "...",
"version": "1.0",
"description": "...",
"manifest_version": 2,
"background": {
"scripts": [ "jquery.js", "popup.js", "jquery.rss.js", "jquery-1.6.4.min.js" ]
},
"icons": {
"16": "images/icon16.png",
"48": "images/icon48.png",
"128": "images/icon128.png"
},
"permissions": [ "tabs", "http://*/*", "https://*/*" ],
"web_accessible_resources": [ "popup.html" ],
"update_url": "http://clients2.google.com/service/update2/crx",
"browser_action": {
"default_locale": "en",
"default_title": "...",
"default_icon": "images/icon.png",
"default_popup": "popup.html"
}
}
帮忙解决问题?