Skip to main content

resetNudge(id, step?)

Resets a nudge to a specific step. If no step is provided, resets the nudge to initial step.

Example

// Reset a nudge with ID 123 to the first step.
window.CommandBar.resetNudge(123)

// Reset the nudge to the third step. We pass a 2 because the steps are zero-indexed.
window.CommandBar.resetNudge(123, 2)

Method parameters

id Required

number

The ID of the nudge. To get this ID, go to the nudges section in the editor, click the ... next to a nudge, then click Copy ID.

step

number

The step to set the nudge to. This is zero-indexed — to reset a nudge to the second step, for example, pass a 1 here. To reset a nudge to the first step, you can skip this argument.