Loads a new HTML page inside the stage. A div with the id, stage, is required.

 

create

Manually creates a page. Pages can also be created from a div and a hyperlink.


Syntax:

lg.page.create(page);

Arguments:

  1. page – (object) Page object.


Example:

lg.page.create({id:'page_home', url:'home.html', title:'LiquidGear', desc:'Welcome to LG', callback:setHome, navigation:true});

Back to Top

 

 

current

Contains the page id of the page currently in view.


Syntax:

lg.page.current;

Returns:

  • (string) Page id.


Example:

var pageID = lg.page.current;

Back to Top

 

 

getByID

Get a page object by its id.


Syntax:

lg.page.getByID(id);

Arguments:

  1. id – (string) Page id.


Example:

lg.page.getByID('page_home');

Back to Top

 

 

getByURL

Get a page object by its url.


Syntax:

lg.page.getByURL(url);

Arguments:

  1. url – (string) Page url.


Example:

lg.page.getByURL('home.html');

Back to Top

 

 

list

An array of pages being used. Each item contains an object with page properties.


Syntax:

lg.page.list;

Returns:

  • (array) Array of page objects.


Example:

var page = lg.page.list[0]; //First page object in list

Back to Top

 

 

next

Contains the page id of the page that was previously viewed if the back button was pressed. The page that was in view but now off to the right.


Syntax:

lg.page.next;

Returns:

  • (string) Page id.


Example:

var pageID = lg.page.next;

Back to Top

 

 

open

Opens a page into the main stage. If you may only want to use this function if you are loading a single page. Otherwise, it is recommended to add the page (using lg.page.add) and then open it using lg.page.next.


Syntax:

lg.page.open(page);

Arguments:

  1. page – (object)
    • url – (string) A url pointing to the page to be loaded.
    • callback – (function) Function to call once page is loaded.


Example:

lg.page.open({url:'home.html', callback:onOpen});

Back to Top

 

 

previous

Contains the page id of the page that was previously viewed. THe page that was in view but now off to the left.


Syntax:

lg.page.previous;

Returns:

  • (string) Page id.


Example:

var pageID = lg.page.previous;

Back to Top

 

 

remove

Removes a page from the lg.page.list array.


Syntax:

lg.page.remove(pageID);

Arguments:

  1. pageID – (string) Page id to diplay.


Example:

lg.page.remove('page_home');

Back to Top

 

 

slideIn

Slides a page into view from left to right.


Syntax:

lg.page.slideIn(pageID);

Arguments:

  1. pageID – (string) Page id to diplay.


Example:

lg.page.slideIn('page_home');

Back to Top

 

 

slideLeft

Slides a page out of view to the left.


Syntax:

lg.page.slideLeft(pageID);

Arguments:

  1. pageID – (string) Page id to diplay.


Example:

lg.page.slideLeft('page_home');

Back to Top

 

 

slideRight

Slides a page out of view to the right.


Syntax:

lg.page.slideRight(pageID);

Arguments:

  1. pageID – (string) Page id to diplay.


Example:

lg.page.slideRight('page_home');

Back to Top