当试图动态创建动态列表视图时,我得到了这个
这是我的 json
{"eventid":["61","23"],"name":["Clare Birthday","Mums Birthday"],"enddate":["Sat 27th April 2013","Wed 19th June 2013"]}
这是我的代码。
<script type="text/javascript">
$(function(){
var items="";
$.getJSON("ajaxResponder.php?method=check-events",function(data){
$("#contacts").html(
'<li data-role="list-divider" role="heading">Live Events</li>'+
$.each(data,function(index,item){
'<li><a href="check-events-details?eventid='+item.eventid+'" data-transition="slide">'+item.name+
'<p>End Date: '+item.enddate+'</p></li>'
}));
$("#contacts").listview("refresh");
});
});
</script>
<div data-role="fieldcontain">
<ul id="contacts" data-role="listview" data-divider-theme="b" data-inset="true">
</ul>
</div>
谁能看到我哪里出错了?