-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
The documentation clearly state that there should be a hidden property:
$("#div-id").timer({
seconds: {Int}, // The number of seconds to start the timer from
duration: {String}, // The time to countdown from. `seconds` and `duration` are mutually exclusive
callback: {Function}, // If duration is set, this function is called after `duration` has elapsed
repeat: {Bool}, // If duration is set, `callback` will be called repeatedly
format: {String}, // Format to show time in
editable: {Bool} // If click and edit time is enabled
hidden; {Bool} // If true, the timer is not displayed in the selected item.
});
But in the code, there's nothing about it:
function getDefaultConfig() {
return {
seconds: 0, // Default seconds value to start timer from
editable: false, // Allow making changes to the time by clicking on it
duration: null, // Duration to run callback after
callback: function() { // Default callback to run after elapsed duration
console.log('Time up!');
},
repeat: false, // This will repeat callback every n times duration is elapsed
countdown: false, // If true, this will render the timer as a countdown (must have duration)
format: null, // This sets the format in which the time will be printed
updateFrequency: 500 // How often should timer display update
};
}
Also there's a few typos in the documentation, missing a comma and replacing ; by :, so it should be:
editable: {Bool}, // If click and edit time is enabled
hidden: {Bool} // If true, the timer is not displayed in the selected item.
Metadata
Metadata
Assignees
Labels
No labels