by Jack Rugile - http://jackrugile.com
jRumble is a jQuery plugin that rumbles, vibrates, shakes, and rotates any element you choose. It's great to use as a hover effect or a way to direct attention to an element.
Documentation, demos, and discussion can all be found at http://jackrugile.com/jrumble
// Initialize jRumble on Selector
$('#rumble-element').jrumble();
// Start rumble on element
$('#rumble-element').trigger('startRumble');
// Stop rumble on element
$('#rumble-element').trigger('stopRumble');
Option | Default | Description |
---|---|---|
x | 2 | Set the horizontal rumble range (pixels) |
y | 2 | Set the vertical rumble range (pixels) |
rotation | 1 | Set the rotation range (degrees) |
speed | 15 | Set the speed/frequency in milliseconds between rumble movements (lower number = faster) |
opacity | false | Activate opacity flickering while rumbling |
opacityMin | .5 | When the opacity option is set to true, this controls the minimum opacity while flickering |