hide the prev or next button in some occasions