Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var paths = new Array();
- var currentDivNumber = 0;
- function moveForward(nameOfNextDiv) {
- //Make some logic to determine what step you are on -
- //If you are not on your latest step -
- paths.push(nameOfNextDiv);
- currentDivNumber++;
- //Your div showing code here ... something LIKE:
- $(nameOfNextDiv).show();
- }
- function moveBackward() {
- currentDivNumber--;
- //Show the div of the currentDivNumber in the array.
- $(paths[currentDivNumber]).show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement