screen-manager
v1.0.1
Published
Manages screens in a single page application
Downloads
4
Readme
#Screen Manager A screen manager for single page apps that need to switch between screens
###Example
import ScreenManager from 'screen-manager';
let manager = new ScreenManager();
Add screens to manager with key, value - screen must be object that impliments show/hide
let $screen0 = $('#screen0');
manager.add('screen0', $screen0);
Show and switch between screens
manager.focus('screen0'); // Shows screen0
let $screen0 = $('#screen1');
manager.add('screen1', $screen1);
manager.focus('screen1'); // Switches to screen1
Remove screen
manager.remove('screen0'); // Remove screen0 from manager