资源说明:Custom events 'movestart', 'move' and 'moveend' for jQuery.
#jquery.event.move Move events provide an easy way to set up press-move-release interactions on mouse and touch devices. *UPDATE 2.0*: `move` events are now compatible with jQuery 3.x. In addition, the underlying implementation is rewritten using vanilla DOM (where before it was jQuery special events only) – jQuery is no longer a requirement. However, if you do not have jQuery you will require a polyfill for Object.assign to support older browsers. I can recommend Object.assign polyfill :) ##Demo and docs stephband.info/jquery.event.move/ ##Move events
- movestart
- Fired following mousedown or touchstart, when the pointer crosses a threshold distance from the position of the mousedown or touchstart.
- move
- Fired on every animation frame where a mousemove or touchmove has changed the cursor position.
- moveend
- Fired following mouseup or touchend, after the last move event, and in the case of touch events when the finger that started the move has been lifted.
- e.pageX
e.pageY - Current page coordinates of pointer.
- e.startX
e.startY - Page coordinates the pointer had at movestart.
- e.deltaX
e.deltaY - Distance the pointer has moved since movestart.
- e.velocityX
e.velocityY - Velocity in pixels/ms, averaged over the last few events.
require('./path/to/jquery.event.move.js')();
##Tweet me
If you use move events on something interesting, tweet me @stephband!
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。