Constructor
new WorldClock($span, tzopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
$span |
jQuerySingleSpan | a jQuery object representing the HTML
|
||
tz |
TimeZoneString |
<optional> |
Europe/London | The timezone for the clock. |
Throws:
-
An error is thrown when an invalid value is passed for any of the arguments.
- Type
- TypeError
Methods
(static) autoInitialise($containersopt)
Initialise all spans with the class pbs-worldclock-auto
within a given
set of containers.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
$containers |
jQueryObject |
<optional> |
$(document) | the container(s) to search for spans to be automatially transformed into clocks. By default the entire document is searched. |
Throws:
-
An error is thrown if the first argument is present, but not a jQuery object.
- Type
- TypeError
start()
Start the clock.
stop()
Stop the clock.
timezone(tzopt) → {TimeZoneString}
Get and/or set the clock's timezone.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
tz |
TimeZoneString |
<optional> |
Throws:
-
An error is thrown if an argument is passed that is not valid.
- Type
- TypeError
Returns:
- Type
- TimeZoneString