我有下面和IE告诉我'id'为空或不是对象。在所有其他浏览器中工作正常,所以认为这可能是IE中的代码格式问题?思考?IE中的jquery错误只有
function addZoom(region){
$('<img />').addClass(settings.zoomClass)
.attr({
src: settings.blankImage,
id: region.id
}).css({
position: 'absolute',
width: region.width,
height: region.height,
top: region.top,
left: region.left,
cursor: 'pointer'
}).appendTo(map).click(function(){
//hide neighboring bullets and zoomables
var width = settings.width;
var height = settings.height;
if(region.scan){
width = region.scanwidth;
height = region.scanheight;
}
$(this).siblings().fadeOut();
$(this).hide()
.attr('src', region.image)
.fadeIn('slow')
.animate({
width: width,
height: height,
top: '0px',
left: '0px'
}, settings.zoomDuration, '', function(){
displayMap(region);
});
});
}
编辑:
这里是全码:http://dl.dropbox.com/u/27101260/map.js
误差以id: region.id
在上面的片段被抛出。
这是完整的代码:[链接](http://dl.dropbox.com/u/27101260/map.js) 错误是在上面的代码片段中引发id:region.id。 – RonnieT 2011-04-26 16:45:20