我刚开始编写一些代码,我正在尝试读取icalendar数据。在js/jquery.icalendar.min.js中不是函数时,它会给出一个javascript错误b.replace
任何想法或帮助都将非常感谢,我在这件事上遇到了很大的麻烦,我没有时间,我以前没有做过
<!--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
});
});发布于 2011-06-23 21:12:43
我认为这是一个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,而alpha使用1.5.x,这可能是问题所在
https://stackoverflow.com/questions/6454245
复制相似问题