HoverGradient
The HoverGradient classes will create an gradient animation when you hover the selected div.
How to Initialize the Hover Gradient?
The initialization of the Hover Gradient is an one step process, just call the function Init of the class with its only arguments (see bellow for more details).
Class Details
Functions:
Initialization & Main Functions
Name |
Arguments |
Return |
Description |
Init |
|
VOID |
This function will set the main members and then relay the initialization to InitEvent. |
InitEvent |
|
VOID |
This function will add the Events to the selected div. This function also call the Animation module. |
Setters Functions
Name |
Arguments |
Return |
Description |
SetDuration |
|
VOID |
Setup the animation duration. |
SetFirstColor |
|
VOID |
Setup the gradient left color |
SetSecondColor |
|
VOID |
Setup the gradient right color |
SetSize |
|
VOID |
This function change the transition size on both side (e.g. Size = 10% will be 20%). |
Private Details
All private details are usable but its recommended to not use any of those. It might modify the proper functioning of the class.
Variables (Members):
Name |
Type |
Default Value |
Description |
id |
String |
undefined |
Global HMTL Id of the viewer (# + name). |
animationInfo |
Class:
|
{
//Animation time: 500,
//Color firstColor: "#000000", secondColor: "#ffffff",
//Size size: 10,
//Direction direction: "Forward" } |
Hold all information required by the animation function Animate(). |
animation |
Integer |
null |
Hold the SetInterval() ID, that can be use to stop the interval. |
animationStopedAt |
Integer |
null |
Where the last animation stopped (Percent not X). |
Functions:
Animation
Name |
Arguments |
Return |
Description |
Animate |
|
VOID |
Function called by Animation module. |
Compatibility
LANGUAGE CLASS: Not compatible.
Created with the Personal Edition of HelpNDoc: Easily create Help documents