¡@

Home 

2014/10/16 ¤W¤È 12:06:04

jquery Programming Glossary: origin.y

jQuery - drag div css background

http://stackoverflow.com/questions/11271704/jquery-drag-div-css-background

0 y 0 movecontinue false function move e var inbounds x false y false offset x start.x origin.x e.clientX y start.y origin.y e.clientY inbounds.x offset.x 0 offset.x 1 bounds.w inbounds.y offset.y 0 offset.y 1 bounds.h if movecontinue inbounds.x.. start.x offset.x start.y offset.y this .css 'background position' start.x 'px ' start.y 'px' origin.x e.clientX origin.y e.clientY e.stopPropagation return false function handle e movecontinue false bg.unbind 'mousemove' move if e.type 'mousedown'.. return false function handle e movecontinue false bg.unbind 'mousemove' move if e.type 'mousedown' origin.x e.clientX origin.y e.clientY movecontinue true bg.bind 'mousemove' move else document.body .focus e.stopPropagation return false function..