-
Notifications
You must be signed in to change notification settings - Fork 34
Description
I'm trying to fix an issue on an existing website that was built a few years ago and originally running version 2.0.2 of jclock (I believe) until I updated it. The developer who originally created this site is long gone and I'm still very new to Javascript.
From what I can tell, they simply have a backend where they can input +1, +2, +3 etc "hours from now" and the clock on the website updates to match the time (http://www.acesamedaycouriers.com/).
The previous developer calls jclock in script.js like this:
jQuery(function(jQuery) {
var startTime = parseInt(jQuery('.jclock').html(), 10) * 1000;
var options = {
format: '%H:%M',
seedTime: startTime
};
jQuery('.jclock').jclock(options);
});
If I comment out the startTime variable and seedTime option, the widget works fine on both the desktop and iOS version. Putting it back in causes Apple devices to display NaN (although, it works fine in Safari). I'm assuming this is because of the way the parseInt line is written and they can't read the output? But I'm not sure what I can do to fix it. Would you have any advice for me?
Thank you!