JSFiddle - React, Tailwind, and code Playground

by k_rma

HTML

<script>
    var picArr = ["http://placekitten.com.s3.amazonaws.com/homepage-samples/200/140.jpg", "http://placekitten.com.s3.amazonaws.com/homepage-samples/200/139.jpg", "http://placekitten.com.s3.amazonaws.com/homepage-samples/200/138.jpg"];
    
    function RandomSwapDown(x) {
        x.src = picArr[Math.floor(Math.random()*3)];
    }
    function SwapBack(x) {
        x.src = picArr[Math.floor(Math.random()*3)];
    }
    function SwapOut(x) {
        x.src = picArr[Math.floor(Math.random()*3)];
    }
</script>
<img src='mouse_normal.png'  onMouseOver='SwapBack(this)' onMouseOut= 'SwapOut(this)' onMouseDown = 'RandomSwapDown(this)' width="121" height="146" >

<img src='mouse_normal.png'  onMouseOver='SwapBack(this)' onMouseOut= 'SwapOut(this)' onMouseDown = 'RandomSwapDown(this)' width="121" height="146" >

<img src='mouse_normal.png'  onMouseOver='SwapBack(this)' onMouseOut= 'SwapOut(this)' onMouseDown = 'RandomSwapDown(this)' width="121" height="146" >