An exercise to create a very simple gallery made with jQuery and AJAX.
train the loading of data with AJAX, jQuery event handlers and CSS positioning.
- basics (see simple-slider-step-1.jpg)
- find (at least) 5 images licensed under creative common (https://unsplash.com/)
- create a file
data.json
consisting of an array of object with the keys -author
-src
-link
-title
- load the
data.json
file using$.getJSON()
- create a "pager" at the bottom of the page, when one of the pager item is clicked - it changes the information (image, author name, author link and title) accordingly - the clicked item is set to "active" (visually different from other pager items
- create a "Next" and "Back" button which when clicked act like clicking on either the next or the previous pager item