I am using jquery to fadein div which i animate to get bigger and then i load php file in it using ajax. Problem is that ajax loads php file before div is visible and animated big enough. Therefore php page shows onscreen and after that div loads under it. How can i slow down php page loading or make it visible after div is visible? Toppi and links are variables. Toppi contains position of div and links php page name.

Here is the code i use:

```
$("#riv1").css("top", + toppi);
$("#riv1").fadeIn();
$("#riv1").animate({height:'600px',opacity:'0.4'},"fast");
$("#riv1").animate({width:'850px',opacity:'0.8'},"fast");
$("#riv1").animate({opacity:'1.0'}, 500);

if (links != '') {
    $.ajax({
        async:false,
        url: links,
        cache: false
    }).done(function( html ) {
        $("#riv1").html(html);
    });
}

```

I have tried 

```
$("#riv1").delay(2000).html(html); 

```

but this does not help.