Java Script Animation
Java script-Animation
Javascript supports various animations to enhance the webpages. It supports the following animations such as
![Java Script Animation java script animation img1](https://www.assignmenthelp.net/webimg/ahp/javascript-assignment-help/java-script-animation-img1.jpg)
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
![Java Script Animation java script animation img2](https://www.assignmenthelp.net/webimg/ahp/javascript-assignment-help/java-script-animation-img2.jpg)
The above example, illustrate how a picture changes its location towards to right with every click.
Automated Animations
![Java Script Animation java script animation img3](https://www.assignmenthelp.net/webimg/ahp/javascript-assignment-help/java-script-animation-img3.jpg)
Output
![Java Script Animation java script animation img4](https://www.assignmenthelp.net/webimg/ahp/javascript-assignment-help/java-script-animation-img4.jpg)
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