I'm in need of some assistance with an issue I'm facing. I have 5 images positioned using Bootstrap and I want to add a fade animation to them on page load. Below is the code snippet I've been using, which works fine, but I would like the images to show up randomly. Can anyone help me achieve this?
$(function () {
$('#fds img').each(function (i) {
$(this).delay((i++) * 1000).fadeTo(2000, 1);
})
});
<div id="fds">
<div class="col-md-12 margin-b-2" style="padding-left: 0; padding-top: 20px">
<div class="com-sm-6 col-md-3">
<img id="img1" class="thumbnail" src="../img/1.jpg" alt="Alternate Text" height="300" width="330" onclick="javascript:modalImg1();" />
</div>
<div class="com-sm-6 col-md-3">
<img id="img2" class="thumbnail" src="../img/2.jpg" alt="Alternate Text" height="300" width="330" onclick="javascript:modalImg2();" />
</div>
<div class="com-sm-6 col-md-3">
<img id="img3" class="thumbnail" src="../img/3.jpg" alt="Alternate Text" height="300" width="330" onclick="javascript:modalImg3();" />
</div>
<div class="com-sm-6 col-md-3">
<img id="img4" class="thumbnail" src="../img/4.jpg" alt="Alternate Text" height="300" width="330" onclick="javascript:modalImg4();" />
</div>
</div>
<div class="col-md-12">
<img id="img5" class="thumbnail" src="../img/5.png" alt="Alternate Text" style="padding-left: 10px; padding-right: 10px" height="300" width="1350" onclick="javascript:modalImg5();" />
</div>
</div>