2011-06-23 38 views
0

我剛剛開始工作的一些代碼,我正在嘗試讀取icalendar數據。 它給出了JS的不是功能的JavaScript錯誤b.replace/jquery.icalendar.min.jsjquery icalendar取出日期

任何意見或幫助將不勝感激,我在一個大麻煩這個東西, 我沒有時間和我沒有這樣做過

<!--iCalendar--> 
    <script src="js/jquery.icalendar.min.js"></script> 

    <!--JSON--> 
    <script src="js/jquery.json.js"></script> 

<script type="application/javascript"> $(document).ready(function(){ 


     var yql_query = "select * from feed where url='"+vars.calendar_feed+"'"; 

     $.YQL(yql_query,function(content){ 
       var ical = $.icalendar.parse(content.query); 

          alert($.toJSON(ical,true)); 
       $('#list').listview('refresh'); 
       /*$.each(content.query.results.item, function(i, item){ 
         //alert(item.title); 
         var listData = ""; 
         listData += '<li class="ui-li-has-thumb">'; 
         listData += '<img src="images/blog.png" class="ui-li-thumb listImage" />'; 
         listData += '<a href="'+item.location+'" rel="external">'; 
         listData += '<h1 class="rowTitle">'+item.title+'</h1>'; 
         listData += '<p class="rowDescription">'+item.description+'</p>'; 
         if(item.pubDate){ 
          listData += '<p class="ui-li-aside">'+item.pubDate+'</p>'; 
         } 
         listData += '</a>'; 
         listData += '</li>'; 
         $('#list').append(listData); 

        });*/ 
        $('#list').listview('refresh'); //needed to reapply formatting 
     }); 
    }); 
+0

你使用的是什麼版本的jQuery? –

回答

0

我在想這是一個jQuery版本問題。

相關:How do I run different versions of jQuery on the same page?

如果這是您正在使用的腳本:http://keith-wood.name/icalendar.html看起來使用jQuery 1.4.4

JQM使用在新的測試版1.6.x版和阿爾法使用1.5.X這可能是問題

+0

我不這麼認爲,可能是語法或代碼中有一些問題,因爲我只是通過更改版本 –

+0

檢查腳本是使用:http://phpicalendar.net/ –

+0

嘗試使用完整版本,而不是最小值版本:jquery.icalendar.min.js –

相關問題