[jQuery] Plugin: Mousehold

[jQuery] Plugin: Mousehold

This would be a perfect thing to meld in with that form scroller plugin.
Can't recall who wrote it, but it converted a form field into a widget that
let you click up and down to change values.
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
andy@icglink.com
615.370.1530 x737
--------------//--------->
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On
Behalf Of John Resig
Sent: Friday, December 15, 2006 1:54 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Plugin: Mousehold
This is a fantastic plugin!
The only suggestion that I have is to reverse the order of the arguments:
$(...).mousehold( 100, function(){ ... } );
and make the timeout argument optional. That way you can still write:
$(...).mousehold( function(){ ... } );
This makes it more consistent with the style of other jQuery methods
(having the callback always be last!)
Also, it may make sense to have the default timeout be something like
'100' - as a timeout of 1 second seems to be kind of useless (IMO).
--John