My requirement: I have 3 set of images- Large images, Vertical images, Rectangle images. When page is refreshed, In the shown layout, I want to display random image of the same set.
My problem is, only first large,vertical,rect angle div is displaying image randomly on every refresh. The other all images are showing the same as previous.
HTML Code:
<div class="largebox">
<a href="">
<img id="largeimg" src="" class="largeimage">
</a>
</div>
Jquery Code:
<script language="javascript">
// random number between 1 and 100
var numRand = Math.floor(Math.random()*13);
document.getElementById("largeimg").src = "img/IMG_"+numRand+".jpg";
</script>