<script>
$(function(){
$('#right_image1').hide().delay('10000').fadeIn('5000').animate({right: '0'}, 5000);
$('#left_image1').hide().delay('10000').fadeIn('5000').animate({left: '0'}, 5000);
});
</script>
/* CSS */
#left_image1 { position: fixed; width: 50%; height: 100%; margin-left: 0; background: url(/images/1.jpg) }
#right_image1 { position: fixed; width: 50%; height: 100%; margin-left: 50%; background: url(/images/2.jpg) }
This code snippet currently fades in two divs after a 10 seconds delay. How can I achieve the effect of having the div on the right slide out of the right side of the browser window after 5 seconds of being displayed, and the left div to slide out of the left side of the browser after 5 seconds?