Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Fade Image Into Another (within a Sprite)…. Something isnt working properly… Re: Fade Image Into Another (within a Sprite)…. Something isnt working properly…

#96071
bdek
Participant

well i got it working another way, and this is how i did it…

HTML:


CSS:

.custom {
position:relative;
overflow: hidden;
}

.custom img.fadein {
position:absolute;
}

Javascript:

$(document).ready(function() {
$(".custom").hover(function() {
$(this).children("img.fadein").fadeOut();
}, function() {
$(this).children("img.fadein").fadeIn();
});
});