Previously navigatePrev() was changing indexh and indexv; instead should
call slide(h, v) and let it change indexh and indexv.
var previousSlide = document.querySelector( HORIZONTAL_SLIDES_SELECTOR + '.past:nth-child(' + indexh + ')' );
if( previousSlide ) {
- indexv = ( previousSlide.querySelectorAll( 'section' ).length + 1 ) || undefined;
- indexh --;
- slide( indexh, indexv );
+ var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined,
+ h = indexh - 1;
+ slide( h, v );
}
}
}