Breadcrumb.AddItem

Syntax

AddItem: function (sender, args)

Parameters

sender. Event source.

args. Event information.

Description

The AddItem event occurs on adding an item to the Breadcrumb component.

Example

To execute the example, create the Breadcrumb component that has a collection of BreadcrumbItem child items. Add handlers for the AddItem and BeforeAddItem events:

        bread.BeforeAddItem.add(function (sender, args) {

            console.log("BeforeAddItem");

        });

        bread.AddItem.add(function (sender, args) {

            alert("AddItem");

        });

After executing the example, before adding an item, that is, on selecting an item from the drop-down list displayed on pressing the button, the browser console displays the BeforeAddItem message. The AddItem message appears in the screen in the handle of adding an item.

See also:

Breadcrumb