views:

78

answers:

4

Hi everyone,

I use jquery version 1.3.2,

I want to use event "load" for load content of a page to "div".

I used: $("#div1").load("page1.php"); ---> it worked.

But i want before do event "load", it waiting about times.

it same: $("#div1").load("page1.php",{after: 5});

please tell me how to do, thank you very much...

+1  A: 

You can try delay plugin or take a look to more traditional approach

Alekc
A: 

You could try to slow the server down in sending its response, e.g.

//sleep for 5 seconds before outputting stuff
sleep(5);
echo 'Now I\'ll talk!';
karim79
A: 

Using settimeout() would be the best and easiest way through.

mmhan
A: 

Try this:

setTimeout(function() {
   $("#div1").load("page1.php");
}, 5000);
Bytecode Ninja