Hi there,
I'm using the settimeout function to slowly expand an image within a page.
This is triggered when the mouse is moved over the image. When the mouse is moved off the image it is reduced back to its original size. My problem is, when I move off the image before it is fully expanded it returns to its normal size and then continues to expand. I think this is because the settimeouts are still queuing.
Is there a way to flush out any settimeouts that are still in the queue?
I know I can use the settimeoout.clear but as I will have loads in the queue, I don't want to keep an array of all the id's that settimeout creates, I just want to drop the lot.
Any idea would be gratfully received.
Thanks.
Andy.
I'm using the settimeout function to slowly expand an image within a page.
This is triggered when the mouse is moved over the image. When the mouse is moved off the image it is reduced back to its original size. My problem is, when I move off the image before it is fully expanded it returns to its normal size and then continues to expand. I think this is because the settimeouts are still queuing.
Is there a way to flush out any settimeouts that are still in the queue?
I know I can use the settimeoout.clear but as I will have loads in the queue, I don't want to keep an array of all the id's that settimeout creates, I just want to drop the lot.
Any idea would be gratfully received.
Thanks.
Andy.