Water drop effect
Water Drop class provides a water drop effect on HTML elements as a standalone package or jquery plugin. It is possible to configure, speed, color, field and toggle animations as fading and expanding
Contents
Download
Example codes
<!DOCTYPE html> <html> <head> </head> <body> <p>On click: <a href='javascript:void(0);' id='click'>Click me</a></p> <p>On mouse over: <a href='javascript:void(0);' id='mouseover'>Hover me</a></p> <p>Manual calling (click on this link, effect will work on above one): <a href='javascript:void(0);' onclick='mo.drop();'>Click me</a></p> <script type="text/javascript" src="./waterDrop.packed.js" ></script> <script type="text/javascript"> new waterDrop("click"); var mo = new waterDrop("mouseover", {event:"mouseover"}); </script> </body> </html>
Live Examples
On click: Click me
On mouse over: Hover me
Manual calling (click on this link, effect will work on above one): Click me
Reverse effect: Click me
Opacity only: Click me
Expand only: Click me
Transparent background: Click me
Styled borders: Click me
Callback previous one on animation end: Click me
Loop animation: Click me
Examples in action
Method list
Constructor
| Method name | new waterDrop(id, config); |
| Description | Add water drop effect to HTML object |
| Input parameters | string or HTML element id - id of element or HTML element itself, where to add water drop effect effect json config - Json structure with configuration properties
|
| Example input | var w = new waterDrop("somelement",
{
//event where to attach effect
event: "click",
//width of border
borderWidth: 2,
//style of border
borderStyle: "solid",
//color of border
borderColor: "black",
//border radius
borderRadius: 5,
//background color
backgroundColor: "white",
//padding from original element
padding: 0,
//fadeOut effect
fadeOut: true,
//expand effect
expand: true,
//animation speed
speed: 10,
//animation progress
step: 1,
//total animation steps
expandSteps: 50,
//reverse effect
reverse: false
}); |
| Jquery Example | $("somelement").waterDrop({event: "click"}) |
Perform effect action
| Method name | drop() |
| Description | Perform effect action without any event |
| Jquery Example | $("somelement").waterDrop("drop") |
Latest changes
None for nowYou may also be interested in:
Powered by BlogAlike.com










