I have a server-side query that I run on my page and it returns a list of 28 records in json format with a few fields in each row. I need to output 4 records from this query at a time within a div and maybe use an un-ordered list with some of the field values showing in each li tag. Then fade/transition to show the next 4 records. When it reaches the end, just cycle back around.
I’ve found libraries that can show one link, one image or whatever at a time and there are fade effects, but I need to be able to show 4 records at a time and then show the next 4, etc. The effect are secondary for me right now I’d like to just start with something that does what I need and then I can work on transitions and other effects.
How can I do this using jQuery’s $.ajax methods. I can get the data, but it’s the onSucess/callback handler where I’d like to output the json-formatted data in groups of 4
The problem I’m having is total number of items varies. Maybe I should have mentioned that. The number of items in each group should always be 4, but the number of records will grow for sure. So in some cases during the cycle, the last list may have only 3 items if that makes sense.
I get what you’re saying about grouping them so each time the next slide comes up it contains all the necessary “li” tags or whatever, just not sure how to do that piece.