JSFiddle - React, Tailwind, and code Playground
HTML
<div class="load">
<ul>
<li>「A」</li>
<li>「B」</li>
<li>「C」</li>
</ul>
</div>
JavaScript
var setElm = $('.load > ul > li');
function random(){
//var setElm = $('.load > ul > li');
//↑ここで変数setElmを宣言するとランダム表示が終わらない。
//var elmLength = setElm.length, randomSet = Math.floor(Math.random()*setElm.length);
//↑ここで変数宣言をせずにそのまま書いてしまうと全ての画像が表示されない。
$(setElm[Math.floor(Math.random()*setElm.length)]).css({visibility:'visible',opacity:'0'}).animate({opacity:'1'},1000);
setElm.splice(Math.floor(Math.random()*setElm.length),1);
if(setElm.length > 0) {
setTimeout(function(){
random();
},100);
} else {
return false;
}
}
random();