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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With