pagemanager.js
pagemanager.js
is a simple module that lets you manage HTML "pages" by keeping the active page shown and every other page hidden.
So, what is a "page"?
A "page" would be something as simple as the following:
Hello! Welcome to My Page Some text here
Every page should be hidden by default, pagemanager
takes care of the visibility. If MY_PAGE
is your default page, you can show it when you first create an instance of PageManager:
var pm = 'my_page';
If you have other pages, you can show them whenever you want:
document { pm;};
You can also load a page from an HTML string whenever you want. You could use this to load remote pages:
var request = ;request; request { if thisstatus >= 200 && thisstatus < 400 pm; pm; }; request;