Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the current step in jQuery steps wizard?

I'm looking for a way to get the current step in my jQuery Steps wizard. I would like to perform an action if the current step is step 1.

like image 883
PaulG Avatar asked Feb 09 '15 19:02

PaulG


1 Answers

This will return the current step index as an integer.

$("#wizard").steps("getCurrentIndex");

This step index is zero-based.

So, to perform an action on the first step (what I assume you mean by "step 1"), you would do:

if ( $("#wizard").steps("getCurrentIndex") == 0 ) {
    perform_action();
}

Ref: https://github.com/rstaib/jquery-steps/wiki/Methods

like image 138
Chris Avatar answered Sep 30 '22 01:09

Chris