Automatically storing the direction of the last page change in slider-model