I have a question for you guys.
I have two functions which I call on mouseover using setTimeout.
However - if the user mouse overs another link - I want the Timeout for the old event cancelled - and set another one for a new function.
I tried using :
onmouseover="clearTimeout(time); clearTimeout(time2); var time = setTimeout(function() { closeAni('story1') }, 900); var time2 = setTimeout(function() { changeStory('story1', 'nav1') }, 1200);"
Just to be clear - this mouseover calls my closeAni function which fades out an image, and then calls the changeStory function which changes the image and displays it.
However, this code doesnt seem to work. It I drag my mouse along the links - I get quick flashes of all the images. I wanted to prevent that by canceling the timeout of the old mouseover before it is excuted and only call the functions for the current mouseover event.
Am I doing something wrong?