<link href="{{componentAssets}}/anim.css" rel="stylesheet" type="text/css">
<div class="intro">
    <p>This demonstrates how to use the <code>easing</code> attribute to change the behavior of the animation.</p>
    <p> Click the icon in the header to shrink the element's <code>height</code> to zero with the "backIn" effect.</p>
</div>

<div class="example">
{{>easing-source}}
</div>

<h2>Setting up the HTML</h2>
<p>First we add some HTML to animate.</p>

```
{{>easing-source-html}}
```

<h2>Creating the Anim Instance</h2>
<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>

```
var anim = new Y.Anim({
    node: '#demo .yui3-bd',
    to: { height: 0 },
    easing: 'backIn'
});
```

<h2>Running the Animation</h2>
<p>Finally we add an event handler to run the animation.</p>
```
var onClick = function(e) {
    e.preventDefault();
    anim.run();
};
Y.one('#demo .yui3-toggle').on('click', onClick);
```

<h2>Complete Example Source</h2>
```
{{>easing-source}}
```
