Class: Pages

Pages

Pages handler using a hash tag


new Pages()

Source:
charte/pages.js
Fires:
  • event:change

Methods


add(id, html, parent)

Add a new page

Parameters:
Name Type Description
id string
html string | Element
parent Element
Source:
charte/pages.js

getId()

Get current page id

Source:
charte/pages.js
Returns:
Type
string

getPage( [id])

Get page element

Parameters:
Name Type Argument Default Description
id string <optional>
'home'
Source:
charte/pages.js
Returns:
Type
Element

setTitle()

Set title

Source:
charte/pages.js

show(id [, nohistory])

Show current page

Parameters:
Name Type Argument Default Description
id string

page id

nohistory boolean <optional>
false
Source:
charte/pages.js