Skip to content

Commit 67930ff

Browse files
authored
add references to new options and methods
expose new options and methods in $.clock.options and $.clock.methods
1 parent bc2d81a commit 67930ff

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

jqClock.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,22 @@ if (!String.prototype.padStart) {
141141
(function($, undefined) {
142142

143143
$.clock = {
144-
"version": "2.2.40",
144+
"version": "2.3.0",
145145
"options": [
146146
{
147147
"type": "string",
148148
"value": "destroy",
149-
"description": "Passing in 'destroy' to an already initialized clock will remove the setTimeout for that clock from the global jqClock variable"
149+
"description": "Passing in 'destroy' to an already initialized clock will remove the setTimeout for that clock to stop it from ticking, and remove all html markup and data associated with the plugin instance on the dom elements"
150+
},
151+
{
152+
"type": "string",
153+
"value": "stop",
154+
"description": "Passing in 'stop' to an already initialized clock will clear the setTimeout for that clock to stop it from ticking"
155+
},
156+
{
157+
"type": "string",
158+
"value": "start",
159+
"description": "Passing in 'start' to an already initialized clock will restart the setTimeout for that clock to get it ticking again, as though it had never lost time"
150160
},
151161
{ "type": "object",
152162
"description": "option set {}",
@@ -195,7 +205,12 @@ if (!String.prototype.padStart) {
195205
}
196206
]
197207
}
198-
]
208+
],
209+
"methods": {
210+
"destroy": "Chaining clock().destroy() has the same effect as passing the 'destroy' option as in clock('destroy')",
211+
"stop": "Chaining clock().stop() has the same effect as passing the 'stop' option as in clock('stop')",
212+
"start": "Chaining clock().start() has the same effect as passing the 'start' option as in clock('start')"
213+
}
199214
};
200215
Object.freeze($.clock);
201216

0 commit comments

Comments
 (0)