Delay Hover Over/Out Events With jQuery - hoverDelay.js

File Size: 3.95 KB
Views Total: 4463
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Delay Hover Over/Out Events With jQuery - hoverDelay.js

The jQuery hoverDelay.js plugin allows you specify the delay time (in milliseconds) to wait before triggering the hover over and hover out events. Typical use cases for this plugin is to trigger the jQuery hover() function only if your user really intended to enter or leave the element.

How to use it:

1. Download and load the jQuery hoverDelay.js plugin after loading jQuery JavaScript library.

<script src="" 
<script src="jquery.hoverDelay.js"></script>

2. Call the function on the target element and specify the delay time in milliseconds as follows:

  delayIn: 200,

3. Do some cool things as you hover over or out of the element.

  delayIn: 200,
  handlerIn: function($element){
    console.log('in started');
    $element.css({backgroundColor: '#FF0000'});
    console.log('in finished');
  handlerOut: function($element){
    console.log('out started');
    $element.css({backgroundColor: '#ccc'});
    console.log('out finished');

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