Slider doesn't work as expected (JQuery, JavaScript)
Below you can find my JQuery and JavaScript Code.
What is it? it is a slider witch starts automatically if the user don't hover any of the divboxes. If he hover a divbox the slider stops and the divbox expand. If the user mouseout the divbox colaps and the automatically slider starts again.
What is the problem? If I'm over a divbox the slider stops, so far so good. But if I now went with my mouse (fast) over the next di开发者_如何学运维vbox this new divbox expand and the old divbox where I was before collaps still everything is fine. But now the automatically slider starts again...but it should stop! here is a little picture
What do I think the problem can be? Is it possible that this is because I went to fast to the next divbox? If I do this slowly it works fine...
/code error/
Your question is showing a /code error/ so I can't see your code that I'm assuming you provided.
My gut reaction is that when you mouseout of the divbox, you are probably triggering an animation on the divbox that has a callback function to start the slider. Maybe its possible that when youmove your mouse quickly onto a new divbox it stops the slider, but since the animation on the closing divbox is still parsing, the callback to start the slider fires after you already moved to a new div, causing the slider to continue.
Just a guess.
精彩评论