Shuffle with Ajax Content

This demo builds off the adding and removing demo to append new items after fetching them from an API and follows the same pattern:

  1. Insert the elements into the shuffle container element (in this case, #grid) however you like. You could use insertAdjacentHTML, jQuery.append, or any other method of inserting new content.
  2. Make an array of the newly added items.
  3. Call add(newItemsArray) on your shuffle instance.

The data comes from https://reqres.in.

Source code for this demo

Link to demo source