Does anyone know how I can generate a new image on page refresh. We have a client who would like a banner, but would like it to show a different image on page reload/refresh.
I am relatively new to Marcom, so excuse my ignorance.
What I am trying:
Made a js page with the below js:
var image = new Array ();
image[0] = "https://files.marcomcentral.app.pti.com/jtd/shared/Images/fpo/jobdirect.jpg";
image[1] = "https://files.marcomcentral.app.pti.com/jtd/shared/Images/fpo/expressions.jpg";
image[2] = "https://files.marcomcentral.app.pti.com/jtd/shared/Images/fpo/fb1_mainbanner.png";
var size = image.length
var x = Math.floor(size*Math.random())
$('#randombanner').attr('src',image[x]);
Added this to the Custom content=>Home Page
<img id='randombanner'/>
Nothing happens, please tell me what I am doing wrong.