Jump to content

Update two different <div>s


Antonio Testa
 Share

Recommended Posts

It seams basic but I did not have success to update two different <div> at same time, every second ....

Here is my code:

<script src='http://code.jquery.com/jquery-latest.js'></script>

<script> $(document).ready(function update(){$('#X0').load('V');setTimeout(update,2500);});</script>

 

To be update:

<div id="X0">will be updated</div>

<div id="X1">will be updated too</div>

 

The server response to get/V:

<div id="X0">new x0 content</div><div id="X1">new x1 content</div>

 

I have tried to make a lot of different changes over function update() but none of them worked...

Thanks for any help. Antonio

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...