I've done some searching/troubleshooting to no avail. I have a simple picture viewer and I added in the JQuery .load() function to make the animation wait to fade back in until the image has loaded. This aspect works great, but it's caused a weird error. If you look through the pictures with the arrows, it begins to develop a weird lag that happens BEFORE the fadeout (fadeTo(200,0)). This makes no sense to me because there's nothing before that line that should cause lag.
(note, this lag does NOT happen when the .load() function is not present)
Here is the JQuery code for the next button (arrow button on left). "largeImage" is the main image you see.
Go to http://www.snowtheband.com/temporary/media.html and click on one of the thumbnails under "picture" to get to the picture viewer.
$("#nextButton").click(function(){
picNumber=parseInt(picNumber);
if (picNumber<7){
picNumber+=1;
picClass="."+picNumber;
var loadPic="images/photos/"+picNumber+"_large.jpg";
descText=$(picClass).prop("alt");
$("#description").fadeTo(200,0,function(){
$("#description").html(descText).fadeTo(200,1);
});
$("#largeImage").fadeTo(200,0,function(){
$("#largeImage").prop("src",loadPic);
$("#imagecontainer img").load(function(){
$("#largeImage").fadeTo(200,1);
});
});
};
});