#
November 25, 2009 at 7:35 pm
I’m pretty new to jQuery so please bear with me on this…
I’d like to fade the two images in the #content div one into another (one time only) when the page is loaded. What I want to do seems simple enough, so I’d like to avoid a plugin, if possible, and just have a short script do it for me.
Here is the html:
And here’s what I’m trying to do with jQuery (I’m sure this is quite horrible):
Code:
$(document).ready(function() {
$(‘img#zoomedOut’).fadeOut(2500),
$(‘img#zoomedIn’).fadeIn(2500);
});
The fadeOut of the first image seems to work fine, but then the second image just appears suddenly, without fading in.
How can I reconfigure the jQuery script to achieve a smooth, simultaneous fadeIn/fadeOut of these two images?
Many thanks in advance!!