function getClosestHandle ( proposal ) {

            var closest = 100;
            var handleNumber = false;

            scope_Handles.forEach(function(handle, index){

                // Disabled handles are ignored
                if ( handle.hasAttribute('disabled') ) {
                    return;
                }

                var pos = Math.abs(scope_Locations[index] - proposal);

                if ( pos < closest ) {
                    handleNumber = index;
                    closest = pos;
                }
            });

            return handleNumber;
        }
function getClosestHandle ( proposal ) {

            var closest = 100;
            var handleNumber = false;

            scope_Handles.forEach(function(handle, index){

                // Disabled handles are ignored
                if ( handle.hasAttribute('disabled') ) {
                    return;
                }

                var pos = Math.abs(scope_Locations[index] - proposal);

                if ( pos < closest ) {
                    handleNumber = index;
                    closest = pos;
                }
            });

            return handleNumber;
        }
function getClosestHandle ( proposal ) { var closest = 100 ; var handleNumber = false ; scope_Handles . forEach ( function ( handle , index ) { // Disabled handles are ignored if ( handle . hasAttribute ( 'disabled' ) ) { return ; } var pos = Math . abs ( scope_Locations [ index ] - proposal ) ; if ( pos < closest ) { handleNumber = index ; closest = pos ; } } ) ; return handleNumber ; }
Find handle closest to a certain percentage on the slider
Find handle closest to a certain percentage on the slider
Get closest handle to proposal