ClearInterval & jQuery Help

Hello Everyone,

I have recently submitted a question on stack overflow and have been unable to get the help I need. Here is a recap but please check it out at:

I have 30 divs that all contain the same classes and styles. I am using a setInterval and some jquery to show 10 divs at a time. The interval slides down (slideDown) a div at the top and slides up (slideUp) a div at the bottom. Everything is working fine but I need to be able to pause the setInterval if an anchor is clicked in one of the visible divs and on the second click the interval should be set again and continue. It’s basically a pause and play effect and the code can be found at the link mentioned above.

Any advice would be greatly appreciated.

You can do that by having the interval code check a flag variable of some kind, such as AllowSlide, so that you can return out of the interval early when it’s not true.