Jump to content

Update two different <div>s

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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...