View Single Post
Old 10-02-2012, 09:06 PM   PM User | #1
ajh108
New to the CF scene

 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ajh108 is an unknown quantity at this point
fadeIn, fadeOut issue

Hi,

I have a hover effect whereby an image is being faded out and another is fading in. However, Is there a way for these actions to happen simultaneously? So as one is fading out the other fades in.

The second image is displayed none on page load.

My code so far is:
Code:
$('.square').mouseenter(function () {
    $(this).attr('data-image', 'two');
    $(this).find('.one').fadeOut('medium');
    $(this).find('.two').fadeIn('medium');
});
Thanks,
ajh108 is offline   Reply With Quote