Banner#render

Instance Method

Render the banner.

Links

Banner#open

Instance Method

Open the banner.

Links

Banner#close

Instance Method

Close the banner.

Links

Banner#buildBannerElement(bannerElement)

Instance Method

Build a full banner element. This is used when no banner or a partial banner exists in the DOM.

parameter type default description
bannerElement (optional) HTMLElement The banner element to build around

Returns

  • HTMLElement - Returns the new banner element

Links

Banner#buildCloseButtonElement

Instance Method

Build a close button element.

Returns

  • HTMLElement - Returns the new close button element

Links

Banner.getOptionsFromDom(bannerElement)

Static Method

Get the data attributes from the bannerElement. If the banner is being set up declaratively, this method is used to extract the data attributes from the DOM.

parameter type default description
bannerElement HTMLElement The banner element in the DOM

Links

Banner.init(rootElement, options)

Static Method

Initialise banner components.

parameter type default description
rootElement HTMLElement | String The root element to intialise banners in, or a CSS selector for the root element
options (optional) Object {} An options object for configuring the banners

Links