JSFiddle - React, Tailwind, and code Playground

by vbelknap

HTML

<div id="flickr-canvas"></div>

JavaScript

var photos = [
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg',
    'http://farm9.staticflickr.com/8098/8453826621_1f9c867059_m.jpg'
    ];

for(var i = 0; i < photos.length; i++) {
 
    //create image element
    var img = $('<img>');
    
    //ad src attribute to image element with image url
    img.attr('src', photos[i]);
    
    //append image to DOM
    $('#flickr-canvas').append(img);
}