Class Spinner

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(options?: SpinnerOptions): Spinner

Parameters

Returns

Spinner

Properties

public el: HTMLElement

The Spinner's HTML element - can be used to manually insert the spinner into the DOM

Methods

public lines(el: HTMLElement, o: SpinnerOptions): HTMLElement

Parameters

Returns

HTMLElement

public opacity(el: HTMLElement, i: number, val: number, o: SpinnerOptions)

Parameters

public spin(target?: HTMLElement): Spinner

Adds the spinner to the given target element. If this instance is already spinning, it is automatically removed from its previous target by calling stop() internally.

Parameters

  • target?: HTMLElement optional

Returns

Spinner

public stop(): Spinner

Stops and removes the Spinner. Stopped spinners may be reused by calling spin() again.

Returns

Spinner