Example. I have a single page application (SPA) that is going to host an image. Every time the page updates I want to display a different image from a list at random. It’s easy to find examples on how to do this. However, the examples only work on a full page load or only for one location. Since this is a SPA there’s rarely a page load (I’m extensively using AJAX against my Web API) and I plan on more than one image list.
Here’s my solution. This was initially based on the “Chicken Dinner” plugin from http://chickendinner.sosweetcreative.com/