Java Script Animation
Java script-Animation
Javascript supports various animations to enhance the webpages. It supports the following animations such as
Java script can assign motions for HTML elements such <img>, <p> etc. Time oriented functions are used for java script animation. Such function are setTImeout and setInterval and clearTimeout.
setTimeout( function, duration)
Allocate time for execution of given function.
setInterval(function, duration)
When the given duration is completed again this function request the given function to execute.
clearTimeout(setTimeout_variable)
It clears the values of setTimeout function.
Types of animations
- Manual animations
- Automated Animations
Manual Animations
The above example, illustrate how a picture changes its location towards to right with every click.
Automated Animations
Output
The functions setInterval, setTimeout, stop are timing oriented functions. The periodic change in the location of the object, it seems like motion.
- Namespaces
- Preprocessor Directives
- Regular Expressions
- Exception Handling
- File I/O
- Attributes
- Reflection
- Properties
- Indexers
- Delegates
- Events
- Collections
- Generics
- Anonymous Methods
- Unsafe Code
- Multithreading
- Variables Declarations
- Build In Types
- Operators
- Unary Operators
- Binary Operators
- Array Operations