js/jquery.event.drag-2.3.0.js
function( event ){
                // sorry, only one touch at a time
                if ( drag.touched )
                    return;
                // the drag/drop interaction data
                var dd = event.data, results;
                // check the which directive
                if ( event.which != 0 && dd.which > 0 && event.which != dd.which )
                    return;
                // check for suppressed selector
                if ( $( event.target ).is( dd.not ) )
                    return;
                // check for handle selector
                if ( dd.handle && !$( event.target ).closest( dd.handle, event.currentTarget ).length )
                    return;

                drag.touched = event.type == 'touchstart' ? this : null;
                dd.propagates = 1;
                dd.mousedown = this;
                dd.interactions = [ drag.interaction( this, dd ) ];
                dd.target = event.target;
                dd.pageX = event.pageX;
                dd.pageY = event.pageY;
                dd.dragging = null;
                // handle draginit event...
                results = drag.hijack( event, "draginit", dd );
                // early cancel
                if ( !dd.propagates )
                    return;
                // flatten the result set
                results = drag.flatten( results );
                // insert new interaction elements
                if ( results && results.length ){
                    dd.interactions = [];
                    $.each( results, function(){
                        dd.interactions.push( drag.interaction( this, dd ) );
                    });
                }
                // remember how many interactions are propagating
                dd.propagates = dd.interactions.length;
                // locate and init the drop targets
                if ( dd.drop !== false && $special.drop )
                    $special.drop.handler( event, dd );
                // disable text selection
                drag.textselect( false );
                // bind additional events...
                if ( drag.touched )
                    $event.add( drag.touched, "touchmove touchend", drag.handler, dd );
                else
                    $event.add( document, "mousemove mouseup", drag.handler, dd );
                // helps prevent text selection or scrolling
                if ( !drag.touched || dd.live )
                    return false;
            }
function( event ){
                // sorry, only one touch at a time
                if ( drag.touched )
                    return;
                // the drag/drop interaction data
                var dd = event.data, results;
                // check the which directive
                if ( event.which != 0 && dd.which > 0 && event.which != dd.which )
                    return;
                // check for suppressed selector
                if ( $( event.target ).is( dd.not ) )
                    return;
                // check for handle selector
                if ( dd.handle && !$( event.target ).closest( dd.handle, event.currentTarget ).length )
                    return;

                drag.touched = event.type == 'touchstart' ? this : null;
                dd.propagates = 1;
                dd.mousedown = this;
                dd.interactions = [ drag.interaction( this, dd ) ];
                dd.target = event.target;
                dd.pageX = event.pageX;
                dd.pageY = event.pageY;
                dd.dragging = null;
                // handle draginit event...
                results = drag.hijack( event, "draginit", dd );
                // early cancel
                if ( !dd.propagates )
                    return;
                // flatten the result set
                results = drag.flatten( results );
                // insert new interaction elements
                if ( results && results.length ){
                    dd.interactions = [];
                    $.each( results, function(){
                        dd.interactions.push( drag.interaction( this, dd ) );
                    });
                }
                // remember how many interactions are propagating
                dd.propagates = dd.interactions.length;
                // locate and init the drop targets
                if ( dd.drop !== false && $special.drop )
                    $special.drop.handler( event, dd );
                // disable text selection
                drag.textselect( false );
                // bind additional events...
                if ( drag.touched )
                    $event.add( drag.touched, "touchmove touchend", drag.handler, dd );
                else
                    $event.add( document, "mousemove mouseup", drag.handler, dd );
                // helps prevent text selection or scrolling
                if ( !drag.touched || dd.live )
                    return false;
            }
function ( event ) { // sorry, only one touch at a time if ( drag . touched ) return ; // the drag/drop interaction data var dd = event . data , results ; // check the which directive if ( event . which != 0 && dd . which > 0 && event . which != dd . which ) return ; // check for suppressed selector if ( $ ( event . target ) . is ( dd . not ) ) return ; // check for handle selector if ( dd . handle && ! $ ( event . target ) . closest ( dd . handle , event . currentTarget ) . length ) return ; drag . touched = event . type == 'touchstart' ? this : null ; dd . propagates = 1 ; dd . mousedown = this ; dd . interactions = [ drag . interaction ( this , dd ) ] ; dd . target = event . target ; dd . pageX = event . pageX ; dd . pageY = event . pageY ; dd . dragging = null ; // handle draginit event... results = drag . hijack ( event , "draginit" , dd ) ; // early cancel if ( ! dd . propagates ) return ; // flatten the result set results = drag . flatten ( results ) ; // insert new interaction elements if ( results && results . length ) { dd . interactions = [ ] ; $ . each ( results , function ( ) { dd . interactions . push ( drag . interaction ( this , dd ) ) ; } ) ; } // remember how many interactions are propagating dd . propagates = dd . interactions . length ; // locate and init the drop targets if ( dd . drop !== false && $special . drop ) $special . drop . handler ( event , dd ) ; // disable text selection drag . textselect ( false ) ; // bind additional events... if ( drag . touched ) $event . add ( drag . touched , "touchmove touchend" , drag . handler , dd ) ; else $event . add ( document , "mousemove mouseup" , drag . handler , dd ) ; // helps prevent text selection or scrolling if ( ! drag . touched || dd . live ) return false ; }
initialize the interaction
initialize the interaction