getActiveItem ()
The getActiveItem method returns the active panel tab.
To execute the example, the page must contain the NavigationBar component named NB (see Example of Creating the NavigationBar Component). Add a button clicking which deletes active panel:
var button = new PP.Ui.Button(
{
ParentNode: document.getElementById("but1"),
Content: "Remove active item",
Click: function ()
{
NB.removeItem(NB.getActiveItem())
}
})
After executing the example clicking the Remove Active Item button removes the active tab.
See also: