JSFiddle - React, Tailwind, and code Playground
by bjelline
HTML
<div id="htmlID"></div>
JavaScript
var conditions = true;
var otherconditions = false;
nameofFunction = function () {
function functionWhichPutsImage() {
$("#htmlID").append('<div class="classname"></div>');
$("#classname").html('imagefilename');
};
if (conditions) {
var timeout = setTimeout(functionWhichPutsImage, 2000);
} else if (otherconditions) {
var timeout = setTimeout(functionWhichPutsImage, 2000);
} else {
testVariable = true;
};
};
nameofFunction();