Interface overwrites the default 'animate' function with an extended one. The new 'animate' function brings several enhancements:
Code sample:
$('#test').animate(
{
left: 100,
style: 'padding: 20px 30px; margin: 10px;',
className: 'greenBorders',
opacity: 0.4,
backgroundColor: 'olive'
},
'slow'
);
Also, Interface offfers new functions to handle animations:
Stop an animation at any time.
Options:
| gotolaststep | Boolean | optional | Whatever to go to the last step in animation |
Code sample:
$('#test').stop();
Stop current animation and clear all queued animations.
Options:
| gotolaststep | Boolean | optional | Whatever to go to the last step in current animation |
Code sample:
$('#test').stopAll();
Add a pause between animations. The selection is not animated till the pausing time expires.
Options:
| speed | String|Number | optional | A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to pause (e.g. 1000). |
| callback | Function | optional | A function to be executed whenever the pausing completes. |
Code sample:
$('#test').pause(2000);