colors.mustache revision 3883a992e58e3629e15903ab299e20fce8483e2c
52N/A<p>Now we create an instance of <code>Y.Anim</code>, passing it a configuration object that includes the <code>node</code> we wish to animate and the <code>to</code> attribute containing the final properties and their values.</p>
52N/A<p>Adding a <code>from</code> attribute allows us to reset the colors <code>onmouseout</code> using the <code>reverse</code> attribute, which we will see below.</p>
52N/A backgroundColor:node.getStyle('backgroundColor'),
52N/A color: node.getStyle('color'),
52N/A borderColor: node.getStyle('borderTopColor')
15N/A<p>Next we need a handler to run when the link is moused over, and reverse when moused out.</p>
15N/A anim.pause();
node.on('mouseover', hover);
node.on('mouseout', hover);