Interactive Attract Hover Effect - Download Interactive Hover Effect With jQuery - Attract Hover

Download Interactive Hover Effect With jQuery – Attract Hover

Posted on

This time I will share jQuery Plugin and tutorial about Interactive Hover Effect With jQuery – Attract Hover, hope it will help you in programming stack.

Interactive Attract Hover Effect - Download Interactive Hover Effect With jQuery - Attract Hover
File Size: 23.6 KB
Views Total: 1084
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Attract Hover is a jQuery plugin that applies an interactive hover effect to any element using CSS3 transitions and transforms. This element will move smoothly with your mouse within a boundary.

How to use it:

1. Insert an element into a container element.

1 <div class="boundary">
2   <a href="#" class="example">
3     Element
4   </a>
5 </div>

2. Insert jQuery library and the jQuery Attract Hover plugin into the document.

2         integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
3         crossorigin="anonymous">
4 </script>
5 <script src="build/attractHover.js"></script>

3. Call the function on the element to enable the hover effect.

1 $.attractHover('.example');

4. Apply a CSS easing to the hover effect.

1 .attract-hover-easing {
2   transition: all 0.3s cubic-bezier(0.250, 0.460, 0.450, 0.940);
3 }

5. Specify the area around the element (in pixels) that starts the interaction.

1 $.attractHover('.example',{
2   proximity: 30
3 });

6. Specify how far the element can move based on the mouse position.

1 $.attractHover('.example',{
2   magnetism: 3
3 });

7. Default CSS classes.

1 $.attractHover('.example',{
2   attractClass: 'attract-hover',
3   attractEasingClass: 'attract-hover-easing',
4   attractAttractedClass: 'attract-hover-attracted'
5 });

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

source : jquery.net