JSFiddle - React, Tailwind, and code Playground
JavaScript
$(function(){
/* Start Adding Images */
var p ='http://localhost.com/sampleimage';
for(var i=0;i<10;i++)
{
$("body").append('<img src="'+p+'_'+i+'.jpg"/>');
}
/* Need to attach handler first */
$("img").error().attr('src',"http://journal.appconnect.in/wp-content/uploads/2013/08/runner_small.gif");
});