| 608 | // `prev` API function goes to previous step (in document order) |
| 609 | // `event` is optional, may contain the event that caused the need to call prev() |
| 610 | var prev = function( origEvent ) { |
| 611 | var prev = steps.indexOf( activeStep ) - 1; |
| 612 | prev = prev >= 0 ? steps[ prev ] : steps[ steps.length - 1 ]; |
| 613 | |
| 614 | return goto( prev, undefined, "prev", origEvent ); |
| 615 | }; |
| 616 | |
| 617 | // `next` API function goes to next step (in document order) |
| 618 | // `event` is optional, may contain the event that caused the need to call next() |