Help - IE7 - jQuery's load() event not working!
Hi,
Can someone help please?
I have an image gallery with a jQuery that fades my images in and out when you click on a thumbnail.
You can see it here -
http://life-studios.com/index.php?id=50
It works perfectly in FF but in IE7 if you click on a thumbnail of an image you have already visited nothing appears.
It seems that IE7 doesn't fire up the jQuery's load() event if the image is coming from it's cache.. I guess that's obvious, but stupid still as other browsers are firing up the load() event even though they are loading the image from cache..
This is the code i'm using -
-
<script type="text/javascript">
//<![CDATA[
function showPic(url,title,descr,width,height) {
$("#maxImage").fadeOut("fast", function(){
var image = new Image();
$(image).attr({src: url, width: width, height: height, id: 'maxImage'}).load(function() {
$(image).hide();
$("#maxImage").attr({
src: url,
width: width,
height: height
});
$("#maxImage").fadeIn("fast");
$("#maxTitle").html(title);
$("#maxDescr").html(descr);
});
});
}
//]]>
</script>
Can anyone help?