So I have the following code:
function moveIt(var1,var2,var3){
document.getElementById(var1).style.var2 = var3;
}
And then call it using
window.setTimeout("moveIt('square','backgroundColor','blue')",1500);
But it stays the same. Changin var2 to backgroundColor in the first code makes it work.
What can I do to solve it?
Thanks.