API
SiteHeader
Parameters
element
HTMLElement DOM element for component instantiation and scopeoptions
Object (optional, default{}
)options.languageLinkSelector
String (optional, default'[data-ecl-language-selector]'
)options.languageListOverlaySelector
String (optional, default'[data-ecl-language-list-overlay]'
)options.closeOverlaySelector
String (optional, default'[data-ecl-language-list-close]'
)options.searchToggleSelector
String (optional, default'[data-ecl-search-toggle]'
)options.searchFormSelector
String (optional, default'[data-ecl-search-form]'
)options.loginToggleSelector
String (optional, default'[data-ecl-login-toggle]'
)options.loginBoxSelector
String (optional, default'[data-ecl-login-box]'
)
init
Initialise component.
destroy
Destroy component.
openOverlay
Shows the modal language list overlay.
closeOverlay
Hides the modal language list overlay.
toggleOverlay
Toggles the modal language list overlay.
Parameters
e
Event
toggleSearch
Toggles the search form.
Parameters
e
Event
toggleLogin
Toggles the login form.
Parameters
e
Event
autoInit
Parameters
root
HTMLElement DOM element for component instantiation and scope$1
Object (optional, default{}
)$1.SITE_HEADER_CORE
(optional, default{}
)
Returns SiteHeader An instance of SiteHeader.