Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrkmg/jquery.onhold
A jQuery plugin for detecting onHold events
https://github.com/mrkmg/jquery.onhold
Last synced: 16 days ago
JSON representation
A jQuery plugin for detecting onHold events
- Host: GitHub
- URL: https://github.com/mrkmg/jquery.onhold
- Owner: mrkmg
- Created: 2011-11-30T18:15:42.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2011-12-15T20:24:37.000Z (almost 13 years ago)
- Last Synced: 2024-10-04T09:59:04.546Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
This is free software. This software may be distributed under the terms of this General Public License v2.
http://www.gnu.org/licenses/gpl-2.0.html
--MrKmgcallback : function(ev)
Options:
time: Period of time a user should have to hold their mouse button down on an object to fire the event;
Measured in Milliseconds
Defaults to 5000
click: Which mouse buttons should count
left, middle, right, left_right, or all
defaults to all
Examples
using defaults (5 seconds, any mouse button)
$(selector/object).onHold(function(ev){ alert('onHold fired') });Custom options (1 second, only left mouse button
$(selector/object).onHold(function(ev){ alert('onHold fired') },{time:1000,click:'left'});see an example working here:
http://jsfiddle.net/YvZcS/