-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
34 lines (24 loc) · 1.83 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
== PROJECT WEBSITE ==
Demo and documentation: http://www.dev4web.eu/projects/jquery.vibrate/
== ABOUT ==
jQuery Vibrate Plugin is a jQuery component, self-contained, that allows you to have "vibrating" tags in your page, like buttons, DIVs, etc.
It is very simple to use and integrate, and lightweight (only 2.93 kB in minified version)!
== DOCUMENTATION ==
The Vibrate plugin has some configurable options. Below is an example of available options and their defaults:
$('.vibrate').vibrate({
speed: 50, // Vibration speed in milliseconds
trigger: "mouseover", // Triggering event
reverse: false, // Reverse behaviour
overEffect: "stop", // Over effect, see details below
vibrateClass: "", // CSS class applied when vibrating (New in vers. 1.1!)
overClass: "", // CSS class applied when over effect is triggered (New in vers. 1.1!)
})
== OPTIONS ==
speed: default value is 50 milliseconds, but can be changed
trigger: it is the triggering event. Default value is "mouseover", another acceptable value is "focus"; other events are not managed
reverse: default value is false; if true, the behaviour will be reversed. E.g., if triggering event is "mouseover", the tag will always vibrate but stop when mouse is over.
overEffect: this is used only when "reverse" parameter is true. The appliable values are "" (empty string), "stop" or "invert". Default value is "stop":
- "stop" (default value): when mouse is over the vibration will be stopped and it will start again when mouse is out;
- "" (empty string): when mouse is over the vibration will continue without stopping;
vibrateClass: name of a CSS class applied when the tag is vibrating, and removed when it stops (default value "")
overClass: name of a CSS class applied when the over effect is triggered, and removed when it ends (default value "")