I wrote an extedned plugin based on jCrop to crop mulitple images one by one.
I developed and debugged using Chrome, and everything worked perfectly without any JavaScript issues. When I came for a test in Explorer, it crashed and threw a script error that wrote out
jcrop api is null or not an object
So my javascript is just ...
var jcrop_api;
$('#SourceImage, #body_SourceImage').Jcrop({},function () { jcrop_api = this; });
jcrop_api.setOptions({
boxWidth: bw,
onSelect: updateCoords,
minSize: [thisImage.Min.Width, thisImage.Min.Height],
aspectRatio: thisImage.AspectRatio
});
jcrop_api.setImage('../cache/uploads/' + fileName);
That everything works in Chrome, and I can change images using a global trigger. I have no idea why this is not working in IE?
source
share