plugin multiple instances with persistent var values?
Hey there,
I am developing a plugin that I want to use 3 or 4 times on the same page.
The problem I am having is that each instance of the plugin sets an interval using setInterval(...) that I need to be able to clear/pause with; clearInterval(interval-id); and restart.
I cant see a way of holding onto the unique interval-ids - i.e. I end up with the interval-id for all instances being the value of the interval-id for the last plugin instance that was created.
I understand why this is happening but I am wondering if there is some kind of "trick" that can be used to create a more partitioned OO style plugin where var's are scoped to the instance/object level.
Thanks in advance.
Cheers
Rob