What is wrong with this function?
function moveColor()
{
document.getElementById(purple).style.marginRight = "34px";
}
with this html:
<div><img src="images/purple.png" id="purple" onclick="colorpurple()" onmouseover="moveColor()" style="cursor:pointer;"/></div>
I also wanted to have it move over a period of 1 second, but can't seem to solve this simple problem.
animatefunction api.jquery.com/animate (there is sample code in the middle of the page)$('#purple').animate({'margin-right':'34px'},1000)