arfa;1285181 wrote:Thanks for persisting.
...
I hope this makes it more clear?
Not really, but I'll try once again... :eek:
Based upon your assignments of:
var colorOld = ['a','b','c','d','e','f','g','h','i','j'];
var colorNew = ['j','i','h','g','f','e','d','c','b','a'];
Each of the following are questions about your logic needs...
1. When you click the first box color 'a' you want it to change to box color 'j'?
2. When you click the first box AGAIN, you want it to change back to box color 'a'?
3. What is to happen if you do #1 and then click the ('j'?) changed box? Does it change to 'a' or 'j'?
Randomly assigning the initial display, colorOld, is not a problem,
but it might effect the second array, colorNew,
if it too is a random match to the assignment from the colorOld array.
So are the arrays colorOld and colorNew linked when randomized or are they independent variables?
I can guess you needs all night, but it would be much faster if you would specify your design requirement.
Specifically set up a click sequence that would give you the changes you require so we can see what should happen
when you perform a pre-determined sequence of DIV box clicks.
What you have specified in your postings does not make sense to me, hence the repeated requests for clarification! 