Your jQuery code was missing, but I suspect you are applying the
hover to the first image. As soon as the other image fades in on top of it, the original image is no longer hovered so triggers the
mouseout and fades out the other image, which starts the whole process again. Instead, apply the
hover to the container:
- $(function() {
- $('#wrapper').hover(function() {
- $('img.hidden', this).fadeIn();
- }, function() {
- $('img.hidden', this).fadeOut();
-
});
- });