extras/noUiSlider/nouislider.js
function eventStart ( event, data ) {

            if ( data.handleNumbers.length === 1 ) {

                var handle = scope_Handles[data.handleNumbers[0]];

                // Ignore 'disabled' handles
                if ( handle.hasAttribute('disabled') ) {
                    return false;
                }

                // Mark the handle as 'active' so it can be styled.
                scope_ActiveHandle = handle.children[0];
                addClass(scope_ActiveHandle, options.cssClasses.active);
            }

            // Fix #551, where a handle gets selected instead of dragged.
            event.preventDefault();

            // A drag should never propagate up to the 'tap' event.
            event.stopPropagation();

            // Attach the move and end events.
            var moveEvent = attachEvent(actions.move, document.documentElement, eventMove, {
                startCalcPoint: event.calcPoint,
                baseSize: baseSize(),
                pageOffset: event.pageOffset,
                handleNumbers: data.handleNumbers,
                buttonsProperty: event.buttons,
                locations: scope_Locations.slice()
            });

            var endEvent = attachEvent(actions.end, document.documentElement, eventEnd, {
                handleNumbers: data.handleNumbers
            });

            var outEvent = attachEvent("mouseout", document.documentElement, documentLeave, {
                handleNumbers: data.handleNumbers
            });

            document.documentElement.noUiListeners = moveEvent.concat(endEvent, outEvent);

            // Text selection isn't an issue on touch devices,
            // so adding cursor styles can be skipped.
            if ( event.cursor ) {

                // Prevent the 'I' cursor and extend the range-drag cursor.
                document.body.style.cursor = getComputedStyle(event.target).cursor;

                // Mark the target with a dragging state.
                if ( scope_Handles.length > 1 ) {
                    addClass(scope_Target, options.cssClasses.drag);
                }

                var f = function(){
                    return false;
                };

                document.body.noUiListener = f;

                // Prevent text selection when dragging the handles.
                document.body.addEventListener('selectstart', f, false);
            }

            data.handleNumbers.forEach(function(handleNumber){
                fireEvent('start', handleNumber);
            });
        }
function eventStart ( event, data ) {

            if ( data.handleNumbers.length === 1 ) {

                var handle = scope_Handles[data.handleNumbers[0]];

                // Ignore 'disabled' handles
                if ( handle.hasAttribute('disabled') ) {
                    return false;
                }

                // Mark the handle as 'active' so it can be styled.
                scope_ActiveHandle = handle.children[0];
                addClass(scope_ActiveHandle, options.cssClasses.active);
            }

            // Fix #551, where a handle gets selected instead of dragged.
            event.preventDefault();

            // A drag should never propagate up to the 'tap' event.
            event.stopPropagation();

            // Attach the move and end events.
            var moveEvent = attachEvent(actions.move, document.documentElement, eventMove, {
                startCalcPoint: event.calcPoint,
                baseSize: baseSize(),
                pageOffset: event.pageOffset,
                handleNumbers: data.handleNumbers,
                buttonsProperty: event.buttons,
                locations: scope_Locations.slice()
            });

            var endEvent = attachEvent(actions.end, document.documentElement, eventEnd, {
                handleNumbers: data.handleNumbers
            });

            var outEvent = attachEvent("mouseout", document.documentElement, documentLeave, {
                handleNumbers: data.handleNumbers
            });

            document.documentElement.noUiListeners = moveEvent.concat(endEvent, outEvent);

            // Text selection isn't an issue on touch devices,
            // so adding cursor styles can be skipped.
            if ( event.cursor ) {

                // Prevent the 'I' cursor and extend the range-drag cursor.
                document.body.style.cursor = getComputedStyle(event.target).cursor;

                // Mark the target with a dragging state.
                if ( scope_Handles.length > 1 ) {
                    addClass(scope_Target, options.cssClasses.drag);
                }

                var f = function(){
                    return false;
                };

                document.body.noUiListener = f;

                // Prevent text selection when dragging the handles.
                document.body.addEventListener('selectstart', f, false);
            }

            data.handleNumbers.forEach(function(handleNumber){
                fireEvent('start', handleNumber);
            });
        }
function eventStart ( event , data ) { if ( data . handleNumbers . length === 1 ) { var handle = scope_Handles [ data . handleNumbers [ 0 ] ] ; // Ignore 'disabled' handles if ( handle . hasAttribute ( 'disabled' ) ) { return false ; } // Mark the handle as 'active' so it can be styled. scope_ActiveHandle = handle . children [ 0 ] ; addClass ( scope_ActiveHandle , options . cssClasses . active ) ; } // Fix #551, where a handle gets selected instead of dragged. event . preventDefault ( ) ; // A drag should never propagate up to the 'tap' event. event . stopPropagation ( ) ; // Attach the move and end events. var moveEvent = attachEvent ( actions . move , document . documentElement , eventMove , { startCalcPoint : event . calcPoint , baseSize : baseSize ( ) , pageOffset : event . pageOffset , handleNumbers : data . handleNumbers , buttonsProperty : event . buttons , locations : scope_Locations . slice ( ) } ) ; var endEvent = attachEvent ( actions . end , document . documentElement , eventEnd , { handleNumbers : data . handleNumbers } ) ; var outEvent = attachEvent ( "mouseout" , document . documentElement , documentLeave , { handleNumbers : data . handleNumbers } ) ; document . documentElement . noUiListeners = moveEvent . concat ( endEvent , outEvent ) ; // Text selection isn't an issue on touch devices, // so adding cursor styles can be skipped. if ( event . cursor ) { // Prevent the 'I' cursor and extend the range-drag cursor. document . body . style . cursor = getComputedStyle ( event . target ) . cursor ; // Mark the target with a dragging state. if ( scope_Handles . length > 1 ) { addClass ( scope_Target , options . cssClasses . drag ) ; } var f = function ( ) { return false ; } ; document . body . noUiListener = f ; // Prevent text selection when dragging the handles. document . body . addEventListener ( 'selectstart' , f , false ) ; } data . handleNumbers . forEach ( function ( handleNumber ) { fireEvent ( 'start' , handleNumber ) ; } ) ; }
Bind move events on document.
Bind move events on document .