-
Notifications
You must be signed in to change notification settings - Fork 0
Mainmenu
NickWare edited this page Dec 27, 2021
·
1 revision
The Mainmenu control is used to create navigation in applications. The element adds the ability to switch between pages.
HTML model:
<div class="Window">
<div class="GlobalArea">
<div class="MainMenu">
<div class="AppIconBlock"><div class="AppIcon"></div></div>
<div class="MainMenuItems">
<div data-pagename="Page1"></div>
<div data-pagename="Page2"></div>
<div data-pagename="Page3"></div>
</div>
</div>
<div class="WorkArea">
<div id="PPage1" class="Page">
Page 1 body
</div>
<div id="PPage2" class="Page">
Page 2 body
</div>
<div id="PPage3" class="Page">
Page 3 body
</div>
</div>
</div>
</div>
Notice: page id must start with letter P.
JS:
facefull.MainMenuBox.onPageOpen = function(name) {
console.log("Page opened:", name)
}
facefull.MainMenuBox.doPageOpenByName("Page2");
if (facefull.MainMenuBox.isPageOpened("Page2")) {
console.log("Page 2 is opened");
}