How can I feed in X amount of items via jQuery then feed in a different x of items?
I was just wondering how I could read items from an XML file to feed in 12 items into an unordered list, then slide those out and feed in another 12 or the remaining amount that is left in the XML, a good example would be http://ww开发者_StackOverfloww.issuu.com - check out the magazines on the wooden background.
Any help would be deeply appreciated!
Cheers.
Make an XHR request to load the file, loop over the childNodes
of some element while
a variable you create (to keeps track of how many you have looked at) is less than both one times the number per "page" and the total.
When you want to add more, continue looping but for two times the number per "page" and so on.
精彩评论