Foundation.UIUtility

If using the Foundation CSS rules, the UI Utility type provides static methods to facilitate common actions on HTML elements.


Implementation Details

Reference paths

  • '/foundation/_digest.ts'
  • '/foundation/core/utilities/_digest.ts'
  • '/foundation/core/utilities/UIUtility.ts'

Extends

This type does not extend a base type.

Implements

This type does not implement any interfaces.


Example

Assuming the following HTML screen:

<!-- Loading screen -->
<div id='FoundationLoadingScreen' class='foundation screen defaultLoadingScreen animated'></div>

Hide and show:

// Hide the screen with ID FoundationLoadingScreen
// Send it out to the bottom on the game HTML container
Foundation.UIUtility.hideScreen('FoundationLoadingScreen', 'hideBottom');

...

// Show the screen again (flies in from its current position (bottom))
Foundation.UIUtility.showScreen('FoundationLoadingScreen');


Static Methods

showScreen(HTMLElementID: string): boolean

  • Show the screen element with the given ID
  • Returns false is no such element exists, otherwise true.

hideScreen(HTMLElementID: string, hideMode?: string): boolean

  • Hide the screen element with the given ID
  • hideMode can be set to one of hideBottom, hideTop, hideLeft, hideRight. Defaults to hideBottom.
  • Returns false is no such element exists, otherwise true.