Cheers for the feedback.

I've quickly swapped over the args and changed the default 1/10th of second
(you're right, once a second is pretty useless!)

I've also tweaked mouse down tracking as suggested by Erik to use a global
flag - otherwise you can some crazy events firing!

Thanks again.


John Resig wrote:
> 
> 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
> 
> On 12/15/06, Remy Sharp <[EMAIL PROTECTED]> wrote:
>>
>> I've written a simple plugin that keeps firing the specified function
>> while
>> the mouse button is held down (i.e. a repeat action).
>>
>> Here it is:
>>
>> http://leftlogic.com/jquery/mousehold.js
>>
>> Here's a bit more detail on how it works - along with an example:
>>
>> http://remysharp.com/2006/12/15/jquery-mousehold-event/
>>
>> Any feedback or bugs please let me know.
>>
>> Cheers,
>>
>> Remy Sharp.
>> --
>> View this message in context:
>> http://www.nabble.com/Plugin%3A-Mousehold-tf2828870.html#a7897334
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>>
> 
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Plugin%3A-Mousehold-tf2828870.html#a7898405
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to