有没有人知道为什么这个代码除了IE9以外都能正常工作?
function showReel(rssLink){
clearGrid();
$(this).load(rssLink, function(event){
var xml = event,
objsArray = [],
xmlDoc = $.parseXML( xml ),
$reelxml = $( xmlDoc ),
$items = $reelxml.find( "item" );
$items.each(function(){
var itemObj = {};
var eachItem = $(this);
itemObj.company = eachItem.find( "title" ).text();
itemObj.movLink = eachItem.find( "link" ).text();
itemObj.thumb = eachItem.find( 'media\\:thumbnail:eq(1), thumbnail:eq(1)' ).attr('url');
var credits = eachItem.find( 'media\\:credit, credit' );
credits.each(function(){
if($(this).attr('role') == "title") itemObj.tit = $(this).text();
if($(this).attr('role') == "director") itemObj.director = $(this).text();
if($(this).attr('role') == "editor") itemObj.editor = $(this).text();
});
objsArray.push(itemObj);
var movStuff = $('<div class="picButt"><span class="pic"><img src="'+itemObj.thumb+'"></span></div>');
movStuff.click(function(event) {
$('#qt').empty();
$('#qt').css('display', 'block');
$('#qt').append('<iframe src="'+itemObj.movLink+'"></iframe>')
logit("clicked "+itemObj.movLink)
});
movStuff.data(objsArray)
$('#grid').append(movStuff);
});
});
}
本地我收到错误
'XML5632:只允许一个根元素。'
在现场它根本不会播放,我收到错误
'SCRIPT438:对象不支持此属性或方法
jquery.min.js,第2行字符21784'
使用未缩小的jQuery,它会在第1725行的字符5中出错,如果是这个话,则会引用这个错误
if ( !id ) {
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
if ( isNode ) {
elem[ internalKey ] = id = ++jQuery.uuid;
} else {
id = internalKey;
}
}
特别是这一行:
elem [internalKey] = id = ++ jQuery.uuid;
非常感谢任何帮助或指针。