Class: BootstrapLoader

BootstrapLoader

Page loader that has a set of steps to move through

Constructor

new BootstrapLoader(options)

Constructor
Parameters:
Name Type Description
options object
Properties
Name Type Attributes Description
steps Array.<object> an array of steps. A step is a simple object with a 'text' and 'err' property that are simple strings
struct object <optional>
Properties
Name Type Attributes Default Description
$wrapper string <optional>
'.loader' the loader wrapper
$progressWrapper string <optional>
'.progress' the progress wrapper
$container string <optional>
'.loader-container' the progress bar container
$text string <optional>
'.loader-text' the loader text
Source:

Extends

Methods

getPercent(id) → {number}

Get the percent of the loader based on the step index
Parameters:
Name Type Description
id number
Source:
Returns:
Type
number

goEnd() → {BootstrapLoader}

Move to the last step
Source:
Returns:
Type
BootstrapLoader

goNext() → {BootstrapLoader}

Move to the next step
Source:
Returns:
Type
BootstrapLoader

goPrev() → {BootstrapLoader}

Move to the previous step
Source:
Returns:
Type
BootstrapLoader

goStart() → {BootstrapLoader}

Move to the first step
Source:
Returns:
Type
BootstrapLoader

setErr(argumentsopt) → {BootstrapLoader}

Move the loader to an error Or set the current step to error state
Parameters:
Name Type Attributes Description
arguments number | string <optional>
optional arguments number - pass a step id to grab the error from string - pass a string error void - sets the error to the current step's error
Source:
Returns:
Type
BootstrapLoader

setProgress(percent) → {BootstrapLoader}

Set the progress of the loader
Parameters:
Name Type Description
percent number
Overrides:
Source:
Returns:
Type
BootstrapLoader

setStep(id) → {BootstrapLoader}

Move the loader to a step
Parameters:
Name Type Description
id number step index
Source:
Returns:
Type
BootstrapLoader

setText(text) → {BootstrapLoader}

Set the text of the loader
Parameters:
Name Type Description
text string
Source:
Returns:
Type
BootstrapLoader