Standardised template

Site header

API

SiteHeaderStandardised

Parameters

  • element HTMLElement DOM element for component instantiation and scope

  • options 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

toggleSearch

Toggles the search form.

Parameters

toggleLogin

Toggles the login form.

Parameters

autoInit

Parameters

  • root HTMLElement DOM element for component instantiation and scope

  • $1 Object (optional, default {})

    • $1.SITE_HEADER_CORE (optional, default {})

Returns SiteHeaderStandardised An instance of SiteHeaderStandardised.