2013-08-17 84 views
0

使用無法解析這個jQuery代碼

http://designshack.net/tutorialexamples/rss-feed-list/index.html(演示教程的http://designshack.net/articles/javascript/build-an-automated-rss-feed-list-with-jquery/

我只是說https://stackoverflow.com/feeds到列表 但它不會被解析,而其他人都正確地分析爲什麼計算器飼料?

<!doctype html> 
<html lang="en-US"> 
<head> 
    <meta charset="utf-8"> 
    <meta http-equiv="Content-Type" content="text/html"> 
    <title>Automated jQuery RSS Feed Demo</title> 
    <meta name="author" content="Jake Rocheleau"> 
    <link rel="shortcut icon" href="http://designshack.net/favicon.ico"> 
    <link rel="icon" href="http://designshack.net/favicon.ico"> 
    <link rel="stylesheet" type="text/css" media="all" href="css/styles.css"> 
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> 
    <script type="text/javascript" language="javascript" src="js/parser.js"></script> 
</head> 

<body> 
<div id="topbar"><a href="http://designshack.net">Back to Design Shack</a></div> 

    <div id="w"> 
    <div id="content"> 
     <h1>Automated jQuery RSS Feed Listing</h1> 

     <div id="nouperss" class="feedcontainer"></div> 
     <hr> 
     <div id="hongkiatrss" class="feedcontainer"></div> 
     <hr> 
     <div id="designmodorss" class="feedcontainer"></div> 
     <hr> 
     <div id="codropsrss" class="feedcontainer"></div> 
    </div><!-- @end #content --> 
    </div><!-- @end #w --> 
<script type="text/javascript"> 
$(function(){ 
    parseRSS('https://stackoverflow.com/feeds', '#stackrss'); 
    parseRSS('http://feeds2.feedburner.com/24thfloor', '#hongkiatrss'); 
    parseRSS('http://feeds.feedburner.com/designmodo', '#designmodorss'); 
    parseRSS('http://feeds2.feedburner.com/tympanus', '#codropsrss') 
}); 
</script> 
</body> 
</html> 
+1

還沒有研究過這個問題,但是如果在最後一次調用'parseRSS()'後添加分號會發生什麼?看到這一行:'parseRSS('http://feeds2.feedburner.com/tympanus','#codropsrss')'。 –

回答

0

的SO飼料是Atom格式,不RSS,所以它不會被適當地由ParseRSS()函數進行解析。