Next and previous button for slider

Hello, is there any way to make next button for a slides after that hide the next button and replace with the previous button?