I am having a very hard time finding a good resources or any idea on how to accomplish the following:
Using jquery get some data
- Use jquery to fetch some data. Now what syntax should the data be in. Go to step 2.
- Again using jquery, assign that data to multiple variables and tags on the html page. I know how to replace 1 tag. But I wanna refresh multiple divs, tags, ids. Go to step 3.
- Now go back to step 1 after some time.
I have tried my friend GOOGLE but it can’t find the pages that I am looking for. I would really appreciate some code here but a link to a tutorial wouldn’t be too bad either.
1)
$.ajax()seems like a good idea, use it to fetch data in the JSON-format:2) Do that in the
success-parameter, as a new function.success: function() {}3) Wrap your
$.ajax()-call in an interval:Edit (response to the comment below):
Try doing it the following way, as you’re not usin a function() as a callback:
Let me know if this works out for you.