i have six function like scan1()
,scan2()
...scan6()
. each function loads different images. now i want to call functions randomly on each time page loads.
for example
page load first time, call sacn4()
page load second time, call scan6()
page load third time, call scan1()
and so on
page load i mean page refresh/reload.
or help me in this code i am trying
var arr = ['scan1()', 'scan2()', 'scan3()'];
var ran = Math.floor(Math.random() * 6) + 1
$(document).ready(arr[ran]);
thanks