DamianWarS
07-07-2009, 09:22 PM
I have a bunch of elements that each have their own colour and when I move the mouse over them they all change to the a "highlighted" colour, when I move it off I need them to go back to their original colour. I decided to store the original colour in a temp value and then when I restore the colour I just pull it from the temp value. So I thought instead of making a new variable why not just use the element I was working with and set a customer property something like "this.temp = this.style.backgroundColor;" It seems to work fine and it keeps my code simple but I was wonder if this was very good practice or not.