jQuery Plugin For Mouse Stop Event - mousestop

File Size: 69.2KB
Views Total: 3695
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin For Mouse Stop Event - mousestop

mousestop is a jQuery plugin that handles Mouse Stop event when mouse hovers over an element on your webpage.

How to use it:

1. Include jQuery Library and mousestop.js

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="./mousestop.js"></script>

2. Markup

<div id="demo">hover over me</div>
<div id="output"></div>

3. Call the plugin

<script type="text/javascript">
	$('#demo').mousestop(function()
	{
	$("#output").append('<div>stopped</div>');
	});
</script>

4. More Options

$('#demo').mousestop({
    timeToStop      : null,         // the amount of time the stop event has to run before it will not run at all anymore
    delayToStop     : '300',        // the delay for what is considered a "stop"
    onMouseout      : null,         // function to run when we mouseout of our element
    onStopMove      : null          // function to run when we start moving again after the stop
});

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