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:
$( ".selector" ).mouse({ cancel: ".title" });
Get or set the cancel
option, after initialization:
// Getter var cancel = $( ".selector" ).mouse( "option", "cancel" ); // Setter $( ".selector" ).mouse( "option", "cancel", ".title" );
0
Code examples:
Initialize the mouse with the delay
option specified:
$( ".selector" ).mouse({ delay: 300 });
Get or set the delay
option, after initialization:
// Getter var delay = $( ".selector" ).mouse( "option", "delay" ); // Setter $( ".selector" ).mouse( "option", "delay", 300 );
1
Code examples:
Initialize the mouse with the distance
option specified:
$( ".selector" ).mouse({ distance: 10 });
Get or set the distance
option, after initialization:
// 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:
$( ".selector" ).mouse( "_mouseCapture" );
delay
option has been met for the current interaction. - This method does not accept any arguments.
Invoke the _mouseDelayMet method:
$( ".selector" ).mouse( "_mouseDelayMet" );
_destroy()
method. - This method does not accept any arguments.
Invoke the _mouseDestroy method:
$( ".selector" ).mouse( "_mouseDestroy" );
distance
option has been met for the current interaction. - This method does not accept any arguments.
Invoke the _mouseDistanceMet method:
$( ".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:
$( ".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:
$( ".selector" ).mouse( "_mouseDrag" );
_create()
method. - This method does not accept any arguments.
Invoke the _mouseInit method:
$( ".selector" ).mouse( "_mouseInit" );
mouseDrag()
method for the extending widget to handle. - This method does not accept any arguments.
Invoke the _mouseMove method:
$( ".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:
$( ".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:
$( ".selector" ).mouse( "_mouseStop" );
mouseStop()
method for the extending widget to handle. - This method does not accept any arguments.
Invoke the _mouseUp method:
$( ".selector" ).mouse( "_mouseUp" );
Please login to continue.