Open tmatt95 opened 9 years ago
When the first object gets added to the page, it will create a javascript timer which will call a reload function every minute on the objects which have a specified class (probably "openshutreload"). To stop the timer from being added more than once, a data attribute will be added to the body tag when the first timer is added. When any more openshut objects are added, the javascript will not add is again.
The status does not update. As a result when the page loads the store may be open but then later on it could close but still be shown as being open in the system. It would be good to have the option to update the time periodically (perhaps through a callback function with a timer e.g
(setTimeout(function(){$('#element').openShut('reload');},3000) ))