I am trying to create a hang on an action that results in a color image, and also after removing the hover, it disappears to the original image.
I got this before fading in the first image using Funka and Brad in this forum, however I need to get it so that it disappears after you're on the fly.
Currently, it disappears in the image, and then the new one disappears. This will remain in place whether I am disconnected or not.
Id like it, so it seems that the color image disappears through black and white, as it was due to wilting to zero before disappearing ... and also to return after deleting the hover.
Any help would be greatly appreciated.
for (var i=0; i < totalBoxes; i++){
$.ajax({
url: "random.php?no=",
cache: false,
success: function(html) {
var $d = $(html).hide().appendTo('#bg').fadeIn('slow');
$('img', $d).hover(function() {
var largePath = $(this).attr("rel");
$(this).fadeOut("slow", function() {
$(this).attr({ src: largePath }).fadeIn("slow");
});
});
}
});
}