I have the below and IE is telling me ‘id’ is null or not an object. Works fine in all other browsers so thinking it might be a code formatting issue in IE? Thoughts?
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);
});
});
}
EDIT:
Here is full code: http://dl.dropbox.com/u/27101260/map.js
The error is being thrown at id: region.id in the above snippet.
Where in your code is the error being thrown? Is it on
id: region.id? If so, it looks to me like you have an issue with your variables scope forregion. This is something that internet explorer is notoriously picky about.Could you post the rest of your code, in particular the bit where
regionis being assigned?