I want to create a function that will cycle through 3 blocks of DIV’s by hitting a “Next” button that will rotate between panel’s 1, 2, and 3 consecutively. Hitting the “Prev” button will go back to the previous panel of DIVs.
Really, I just want to cycle through a few panel of DIVS – hide & showing each of them with the same effect as the jsFiddle.
I know a lot dirty way to make a function to cycle through, but I know there’s an easier way versus adding classes, individual functions for each step and button.
Here’s my jsFiddle. Click the next button and you’ll see how I’m looking to have the “panels” cycled.
http://jsfiddle.net/QWQYS/4/
Edited your fiddle so the next button works. If you want me to do the previous button too then let me know. It just sees what panel is visible, hides it and then shows the next panel in the code.
Edit: Added the prev button function too.