marilynn.fowler
02-13-2011, 09:03 PM
I am new to jQuery (2 weeks). I would like to set up my animations so that the #logo slides in over a period of 3 seconds, then the #homeDetail fades in over a period of 5 seconds. I don't know how to control the speed of the logo slide, and I don't know how to tell the #homeDetail to start after the slide.
Here's the code I'm using right now:
<script type="text/javascript">
$(document).ready(function() {
$("img#homeDetail").fadeIn(5000);
var $lefty = $("#logo");
$lefty.animate({
left: parseInt($lefty.css('left'),10) == 15 ?
-$lefty.outerWidth() :
15
});
});
</script>
Here's the code I'm using right now:
<script type="text/javascript">
$(document).ready(function() {
$("img#homeDetail").fadeIn(5000);
var $lefty = $("#logo");
$lefty.animate({
left: parseInt($lefty.css('left'),10) == 15 ?
-$lefty.outerWidth() :
15
});
});
</script>