src/navigation.js
function touchend(e) {
        if (isDown) {

            isDown = false;

            var touch;


            if (e.type == 'touchend') //Check for touch event or mousemove
                touch = getTouch(e);
            else
                touch = e;

            $(window).off('mousemove touchmove', mousemove); //Stop listening for the mousemove event


            //Check if vertical panning (swipe out) or horizontal panning (carousel swipe)
            //Vertical PANNING
            if (vertical_pan && options.swipe_out) {

                //HAPPENS WHEN SWIPEOUT

                vertical_pan = false; //Back to false for mousewheel (Vertical pan has finished so enable mousewheel scrolling)

                swipeOut();

                return;
            } //Veritcal Pan
            else if ($el.end_animation && !options.disable_slide) { //if finished animation of sliding and swiping is not disabled

                //Calculate deltaTime for calculation of velocity
                var deltaTime = (Date.now() - swipeStartTime);
                //Verify delta is > 0 to avoid divide by 0 error
                deltaTime++;
                vars.velocity = -(touch.pageX - startPointX) / deltaTime;

                if (vars.velocity > 0) { //Set direction
                    vars.direction = 1; //PAN LEFT
                } else {
                    vars.direction = -1;
                }


                vars.distanceFromStart = (touch.pageX - startPointX) * vars.direction * -1; //Yaaa SOOO
                var landingSlideIndex = anim.getLandingSlideIndex(vars.velocity * options.swipe_sensitivity - $el.translate3d().x);

                //TAP is when deltaX is less or equal to 12px

                if (vars.distanceFromStart > 6) {
                    anim.gotoSlideByIndex(landingSlideIndex);
                    return;
                }
            } //Regular horizontal pan until here


            //TAP - click to slide
            $el.trigger({
                type: "clickSlide",
                slide: $el.savedSlideIndex
            });

            if ($el.savedSlideIndex != vars.currentIndex && !options.disable_clicktoslide) { //If this occurs then its a tap
                e.preventDefault();
                anim.gotoSlideByIndex($el.savedSlideIndex);
            }
            //TAP until here
        }

    }
function touchend(e) {
        if (isDown) {

            isDown = false;

            var touch;


            if (e.type == 'touchend') //Check for touch event or mousemove
                touch = getTouch(e);
            else
                touch = e;

            $(window).off('mousemove touchmove', mousemove); //Stop listening for the mousemove event


            //Check if vertical panning (swipe out) or horizontal panning (carousel swipe)
            //Vertical PANNING
            if (vertical_pan && options.swipe_out) {

                //HAPPENS WHEN SWIPEOUT

                vertical_pan = false; //Back to false for mousewheel (Vertical pan has finished so enable mousewheel scrolling)

                swipeOut();

                return;
            } //Veritcal Pan
            else if ($el.end_animation && !options.disable_slide) { //if finished animation of sliding and swiping is not disabled

                //Calculate deltaTime for calculation of velocity
                var deltaTime = (Date.now() - swipeStartTime);
                //Verify delta is > 0 to avoid divide by 0 error
                deltaTime++;
                vars.velocity = -(touch.pageX - startPointX) / deltaTime;

                if (vars.velocity > 0) { //Set direction
                    vars.direction = 1; //PAN LEFT
                } else {
                    vars.direction = -1;
                }


                vars.distanceFromStart = (touch.pageX - startPointX) * vars.direction * -1; //Yaaa SOOO
                var landingSlideIndex = anim.getLandingSlideIndex(vars.velocity * options.swipe_sensitivity - $el.translate3d().x);

                //TAP is when deltaX is less or equal to 12px

                if (vars.distanceFromStart > 6) {
                    anim.gotoSlideByIndex(landingSlideIndex);
                    return;
                }
            } //Regular horizontal pan until here


            //TAP - click to slide
            $el.trigger({
                type: "clickSlide",
                slide: $el.savedSlideIndex
            });

            if ($el.savedSlideIndex != vars.currentIndex && !options.disable_clicktoslide) { //If this occurs then its a tap
                e.preventDefault();
                anim.gotoSlideByIndex($el.savedSlideIndex);
            }
            //TAP until here
        }

    }
function touchend ( e ) { if ( isDown ) { isDown = false ; var touch ; if ( e . type == 'touchend' ) //Check for touch event or mousemove touch = getTouch ( e ) ; else touch = e ; $ ( window ) . off ( 'mousemove touchmove' , mousemove ) ; //Stop listening for the mousemove event //Check if vertical panning (swipe out) or horizontal panning (carousel swipe) //Vertical PANNING if ( vertical_pan && options . swipe_out ) { //HAPPENS WHEN SWIPEOUT vertical_pan = false ; //Back to false for mousewheel (Vertical pan has finished so enable mousewheel scrolling) swipeOut ( ) ; return ; } //Veritcal Pan else if ( $el . end_animation && ! options . disable_slide ) { //if finished animation of sliding and swiping is not disabled //Calculate deltaTime for calculation of velocity var deltaTime = ( Date . now ( ) - swipeStartTime ) ; //Verify delta is > 0 to avoid divide by 0 error deltaTime ++ ; vars . velocity = - ( touch . pageX - startPointX ) / deltaTime ; if ( vars . velocity > 0 ) { //Set direction vars . direction = 1 ; //PAN LEFT } else { vars . direction = - 1 ; } vars . distanceFromStart = ( touch . pageX - startPointX ) * vars . direction * - 1 ; //Yaaa SOOO var landingSlideIndex = anim . getLandingSlideIndex ( vars . velocity * options . swipe_sensitivity - $el . translate3d ( ) . x ) ; //TAP is when deltaX is less or equal to 12px if ( vars . distanceFromStart > 6 ) { anim . gotoSlideByIndex ( landingSlideIndex ) ; return ; } } //Regular horizontal pan until here //TAP - click to slide $el . trigger ( { type : "clickSlide" , slide : $el . savedSlideIndex } ) ; if ( $el . savedSlideIndex != vars . currentIndex && ! options . disable_clicktoslide ) { //If this occurs then its a tap e . preventDefault ( ) ; anim . gotoSlideByIndex ( $el . savedSlideIndex ) ; } //TAP until here } }
END OF MOUSEMOVE
END OF MOUSEMOVE