Imagine this

 

When a user moves the mouse over a certain div (mouseover) on your page you
want to do some things

 

1. fadeOut a graphic in that div to 50%

2. Make a button in that div appear (show)

3. Manipulate the button's 3 states (my wonderful 3 state button gizmo)

 

4.   When the user clicks the mouse call function A and reverse the above,
fadeIn the graphic back to 100%, hide the button.

5. If the user moves the mouse out of the div area (mouseout) then reverse
the above, fadeIn the graphic back to 100%, hide the button.

 

Sounds easy right? Well it's not. Why? 

 

Because of the way jQuery queues up the events, the a mouseover and a
mouseout events interact in such a way that the whole process goes bananas,
there is a great deal of flickering of the graphics when you move the mouse
because it is sending mouseover messages.

 

What I need to do is to have it act more like hover, which avoids these
issues. Except for one problem. I am using a button over the graphic that
uses hover also. So the two processes fight eachother.

 

I need a way to say

 

jQuery - I need you to do something a bit different.

Respond to my mouseover as usual but then don't look at mouseover for a
while.

That way I could process the other events.

 

Any ideas on how to do this. I thought perhaps using a call back would help
but that seems to just let me control one thing finishing before another
starts which is not my issue.

 

Thanks

 

Mitch

 

 

Reply via email to