function _goToPage(amount, noAnimation) {

        // Get current scroll-position. When a previous call was made to
        // `scroll' or `scrollTo` and that node has not yet been reached, then
        // the amount is accumalated onto that scroll target.
        var viewSequence = (!noAnimation ? this._scroll.scrollToSequence : undefined) || this._viewSequence;
        if (!this._scroll.scrollToSequence && !noAnimation) {
            var firstVisibleItem = this.getFirstVisibleItem();
            if (firstVisibleItem) {
                viewSequence = firstVisibleItem.viewSequence;
                if (((amount < 0) && (firstVisibleItem.scrollOffset < 0)) ||
                    ((amount > 0) && (firstVisibleItem.scrollOffset > 0))) {
                    amount = 0;
                }
            }
        }
        if (!viewSequence) {
            return;
        }

        // Find scroll target
        for (var i = 0; i < Math.abs(amount); i++) {
            var nextViewSequence = (amount > 0) ? viewSequence.getNext() : viewSequence.getPrevious();
            if (nextViewSequence) {
                viewSequence = nextViewSequence;
            }
            else {
                break;
            }
        }
        _goToSequence.call(this, viewSequence, amount >= 0, noAnimation);
    }
function _goToPage(amount, noAnimation) {

        
        
        
        var viewSequence = (!noAnimation ? this._scroll.scrollToSequence : undefined) || this._viewSequence;
        if (!this._scroll.scrollToSequence && !noAnimation) {
            var firstVisibleItem = this.getFirstVisibleItem();
            if (firstVisibleItem) {
                viewSequence = firstVisibleItem.viewSequence;
                if (((amount < 0) && (firstVisibleItem.scrollOffset < 0)) ||
                    ((amount > 0) && (firstVisibleItem.scrollOffset > 0))) {
                    amount = 0;
                }
            }
        }
        if (!viewSequence) {
            return;
        }

        
        for (var i = 0; i < Math.abs(amount); i++) {
            var nextViewSequence = (amount > 0) ? viewSequence.getNext() : viewSequence.getPrevious();
            if (nextViewSequence) {
                viewSequence = nextViewSequence;
            }
            else {
                break;
            }
        }
        _goToSequence.call(this, viewSequence, amount >= 0, noAnimation);
    }
function _goToPage ( amount , noAnimation ) { // Get current scroll-position. When a previous call was made to // `scroll' or `scrollTo` and that node has not yet been reached, then // the amount is accumalated onto that scroll target. var viewSequence = ( ! noAnimation ? this . _scroll . scrollToSequence : undefined ) || this . _viewSequence ; if ( ! this . _scroll . scrollToSequence && ! noAnimation ) { var firstVisibleItem = this . getFirstVisibleItem ( ) ; if ( firstVisibleItem ) { viewSequence = firstVisibleItem . viewSequence ; if ( ( ( amount < 0 ) && ( firstVisibleItem . scrollOffset < 0 ) ) || ( ( amount > 0 ) && ( firstVisibleItem . scrollOffset > 0 ) ) ) { amount = 0 ; } } } if ( ! viewSequence ) { return ; } // Find scroll target for ( var i = 0 ; i < Math . abs ( amount ) ; i ++ ) { var nextViewSequence = ( amount > 0 ) ? viewSequence . getNext ( ) : viewSequence . getPrevious ( ) ; if ( nextViewSequence ) { viewSequence = nextViewSequence ; } else { break ; } } _goToSequence . call ( this , viewSequence , amount >= 0 , noAnimation ) ; }
Moves to the next node in the viewSequence.

@param {Number} [amount] Amount of nodes to move
@param {Bool} [noAnimation] When set to true, immediately shows the node without any scrolling animation.
Moves to the next node in the viewSequence .