I currently have an assignment that is really pushing my limits so I need some help on how to approach this.
- We have a set of 25 results
- We are using a jquery plugin to vertically scroll through these 25 results, the container displays five results at a time.
- When viewing the source code of the page, you can see the html for all 25 results. Obviously the jquery plugin is what is making them visible or not.
- The task is to make it so that only five of the result set are displaying at any time during a source code viewing. All the rest of the results must come from javascript or some other technique.
So I somehow have to either:
- Send a pool of 25 results to JS and have it generate the div info on the fly OR
- Some type of timed script that grabs five results at a time and displays them. But this all has to continuously scroll vertically so that is a consideration also.
So I am trying to get my head around how I should approach this: One idea I had was to run an ajax call every five or ten seconds that has a php script generate five new results, then display them in the appropriate div. This is slow and would basically mean a page that is constantly sending out ajax calls. the random results are coming from a php script that is parsing an xml feed.
I am really just looking for a roadmap or some conceptual directions on how this could be approached.