Similar to jQuery.Widget
, the mouse interaction is not intended to be used directly. It is purely a base layer for other widgets to inherit from. This page only documents what is added to jQuery.Widget
, but it does include internal methods that are not intended to be overwritten. The intended public API is _mouseStart()
, _mouseDrag()
, _mouseStop()
, and _mouseCapture()
.
Dependencies
"input,textarea,button,select,option"
Code examples:
Initialize the mouse with the cancel
option specified:
1 2 3 | $( ".selector" ).mouse({ cancel: ".title" }); |
Get or set the cancel
option, after initialization:
1 2 3 4 5 | // Getter var cancel = $( ".selector" ).mouse( "option" , "cancel" ); // Setter $( ".selector" ).mouse( "option" , "cancel" , ".title" ); |
0
Code examples:
Initialize the mouse with the delay
option specified:
1 2 3 | $( ".selector" ).mouse({ delay: 300 }); |
Get or set the delay
option, after initialization:
1 2 3 4 5 | // Getter var delay = $( ".selector" ).mouse( "option" , "delay" ); // Setter $( ".selector" ).mouse( "option" , "delay" , 300 ); |
1
Code examples:
Initialize the mouse with the distance
option specified:
1 2 3 | $( ".selector" ).mouse({ distance: 10 }); |
Get or set the distance
option, after initialization:
1 2 3 4 5 | // Getter var distance = $( ".selector" ).mouse( "option" , "distance" ); // Setter $( ".selector" ).mouse( "option" , "distance" , 10 ); |
true
. - This method does not accept any arguments.
Invoke the _mouseCapture method:
1 | $( ".selector" ).mouse( "_mouseCapture" ); |
delay
option has been met for the current interaction. - This method does not accept any arguments.
Invoke the _mouseDelayMet method:
1 | $( ".selector" ).mouse( "_mouseDelayMet" ); |
_destroy()
method. - This method does not accept any arguments.
Invoke the _mouseDestroy method:
1 | $( ".selector" ).mouse( "_mouseDestroy" ); |
distance
option has been met for the current interaction. - This method does not accept any arguments.
Invoke the _mouseDistanceMet method:
1 | $( ".selector" ).mouse( "_mouseDistanceMet" ); |
delay
and distance
options are met prior to starting the interaction. When the interaction is ready to start, invokes the _mouseStart()
method for the extending widget to handle. - This method does not accept any arguments.
Invoke the _mouseDown method:
1 | $( ".selector" ).mouse( "_mouseDown" ); |
_mouseDrag()
method to handle each movement of an interaction. This method will receive the mouse event associated with the movement. - This method does not accept any arguments.
Invoke the _mouseDrag method:
1 | $( ".selector" ).mouse( "_mouseDrag" ); |
_create()
method. - This method does not accept any arguments.
Invoke the _mouseInit method:
1 | $( ".selector" ).mouse( "_mouseInit" ); |
mouseDrag()
method for the extending widget to handle. - This method does not accept any arguments.
Invoke the _mouseMove method:
1 | $( ".selector" ).mouse( "_mouseMove" ); |
_mouseStart()
method to handle the beginning of an interaction. This method will receive the mouse event associated with the start of the interaction. - This method does not accept any arguments.
Invoke the _mouseStart method:
1 | $( ".selector" ).mouse( "_mouseStart" ); |
_mouseStop()
method to handle the end of an interaction. This method will receive the mouse event associated with the end of the interaction. - This method does not accept any arguments.
Invoke the _mouseStop method:
1 | $( ".selector" ).mouse( "_mouseStop" ); |
mouseStop()
method for the extending widget to handle. - This method does not accept any arguments.
Invoke the _mouseUp method:
1 | $( ".selector" ).mouse( "_mouseUp" ); |
Please login to continue.