Previous/Next button for Dynamic Pages

tried your hide() function. So much better thanks ^^

Hi, I am trying to loop my previous and next button on a dynamic page. I am not a coder, hence unable to find out my mistake here. Can someone help me here. Should this code work for the purpose or should I change it. Thanks!