You need to use two forms of the animation argument, with queue:falsein the parameters array (in the first animation):
<script type="text/javascript">
$(document).ready(function(){
$(".topFrameAnim").css("opacity", "0.0")
.animate({
marginLeft: "0",
}, { queue: false, duration: 500 )
.animate({
opacity: "1",
}, 1000 );
});
</script>
Note. Here you can reduce the number of selectors used. Since you select the same objects, it is better to reuse an existing object.
source
share