var all = [l1, l2, l3, l4, // l16 ],
randomnumber = Math.floor(Math.random() * all.length);
This function randomly selects a function to run (each function ajax-loads an image background).
How to ensure that you don't see the same image twice: that the function selected is eliminated subsequent runs. Maybe it can be done using 'pop', but I need a hand with the syntax… Any helpers?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread