--- layout: default title: Loading ajax content description: Fetch data from an api, then add it to Shuffle. image: /demos/ajax.jpg extraJS: ["demos/ajax.js"] externalJS: ["https://unpkg.com/whatwg-fetch"] prism: true photoCredit: false ---
This demo builds off the adding and removing demo to append new items after fetching them from an API and follows the same pattern:
#grid
) however you like. You could use insertAdjacentHTML
, jQuery.append
, or any other method of inserting new content.add(newItemsArray)
on your shuffle instance.The data comes from https://reqres.in.