This question has already been answered:
- Horizontal switching div 2 answer
There are several blocks, it is necessary that they alternately switch and there are buttons for the buttons on the transition to the blocks, i.e. there are 5 blocks then there are 5 buttons, clicking on 5 we go to block 5