Clear timer reference outside of a plugin
Hi, I have a plugin that makes use of setInterval()/clearInterval) to activate a scrolling slider.
The plugin acts on a div that is filled with ajax data. This works fine as long as the data is not refreshed.
After the div is updated, the plugin is re-applied to the new data. This raises erratic scrolling effects as the previous time reference (timeID) was not cleared. If auto mode is disabled, manual scrolling works fine upon an update. Thus, potential js code errors may be disregarded.
Question: Is there a way to automatically clear this global time reference after flushing data? (I tried to externally call the plugin reset() function prior to emptying the data, but that does not work.) TIA. for any suggestions.