NavigationItem.getIsCollapsed

Syntax

getIsCollapsed ();

Description

The getIsCollapsed method returns if the panel is collapsed.

Comments

If the panel is closed, the property returns True, otherwise it returns False.

Example

To execute the example enable the hyperlinks to the PP.js libraries and the table of the PP.css visual styles. Create a NavigationBar component named NB and that has two tabs. Expand the tab using the method expand.

<script type="text/javascript">

    var NB = new PP.Ui.NavigationBar({

        ParentNode: document.getElementById("NB1"),

        Width: 200,

        ShowBorders: true

    });

    NB.addItem(new PP.Ui.NavigationItem({ Content: "1", Title: "1" }));

    NB.addItem(new PP.Ui.NavigationItem({ Content: "2", Title: "2" }));

    NB.getItem(0).expand();

    var a = NB.getItem(0).getIsCollapsed();

        if (a === false)

            alert("Panel is expanded");

</script>

After executing the example the HTML page houses a navigation panel with the first tab expanded. The following message appears on the screen: Panel is expanded.

See also:

NavigationItem