[Solved] Text change when background colour changes using Javascript
Simply have the text in an array, ( get it from some elements using jquery – however you want it) iterate through it and change the content inside the div using html() function when you are changing the color. Simple modification of your code would be something like function changeColorAndText(element, curNumber){ curNumber++; if(curNumber > 4){ … Read more