This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Event Assess API

item:goto

Fires when navigating between Items in an Activity. This event was created to align with the goto public method.

You would want to be notified about this event firing, because you may want to take an action, such as displaying a modal window, while navigating to a new Item by calling the goto public method for Items API.

Examples

itemsApp.on('item:goto', function (itemIndex) {
    console.log('This code executes when the Item is changing when using the goto() public method.');
});

Callback arguments

  • itemIndex integer
    The zero-based index of the Item that is being navigated to.

Caveats

  • This event won't be fired when the initial Item has been made visible. This is because there is a small duration when the new Item is being loaded and rendered.
  • Use the item:changed or item:changing events to track navigation to the initial Item.
  • Use item:load to track when an intro is made visible.

Related articles

  • The item:changing event, to know when the assessment first begins navigating away to another Item.
  • The item:changed event, to know when the assessment has finished navigating to an Item.
Was this article helpful?