Direction Aware Cursor Hover Effect - jQuery springyElement

File Size: 3.88 KB
Views Total: 1218
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Direction Aware Cursor Hover Effect - jQuery springyElement

The springyElement jQuery plugin detects which direction a user enters/exits an element and apply a 'springy' effect to the element on mouse hover.

The plugin also supports touch events. It automatically resets the position of the element when the mouse leaves (or the touch is released).

Based on the CSS translate() transform function. So that the plugin works with the modern browsers which support CSS3 2D transforms.

See also:

How to use it:

1. Load the springyElement.js script after loading the latest jQuery JavaScript library (slim build).

<script src="" 
<script src="springyElement.js"></script>

2. Attach the plugin to the target element and done.

<div id="example">

3. Specify the max distance the element can travel in pixels. Default: 20px.

<div id="example2">
  Element 2

This awesome jQuery plugin is developed by justMoritz. For more Advanced Usages, please check the demo page or visit the official website.