techlab/jquery-smartwizard

How to remove next step when on last page

Closed this issue · 2 comments

On the last step, the next button is disable. How can I remove it as users found it confusing when on the last step.

You can implement 'leavestep' event and check if the next step is your last step then write $('.sw-btn-next').hide(); code to hide the Next button.

$("#smartwizard").on("leaveStep", function (e, anchorObject, currentStepIndex, nextStepIndex, stepDirection) { if (nextStepIndex === 3 && stepDirection === 'forward') { $('.sw-btn-next').hide() } });

thanks @nikesh9220 that did it 👍