+ Start a Discussion
Gm ChouhanGm Chouhan 

i want to shuffle image randomly

i have upload same image in static resource and i want shuffle those images randomly after some time.
pls help....
Hi Gm,

    I would have improached in this way.
    Have image names have specific interger patter e.g(IMG-1.jpg,IMG-2.jpg,IMG-3.jpg....)
    Then use setInterval method in JS to Radomize the integer value and update the Image Url.
    setInterval(function () {
        //Use Math.Randomize to get interger in specific range and set the image href here.