Ok so my basic problem is as follows. I have an image that causes everything else on the page disable using a blank div with a z-index. This is during a mouseover event of the image. Next the code goes into setting the z-index on the div that I want to be able to click or mouseover. Also I wrapping these images in a div that is used for a mouseout event to hide the images I do not want to show.
However when mousing over the images or text inside the div it causes the mouseout event to trigger. I have looked into event bubbling but it does not seem to be what is happening. Is there a way to turn off the mouseout event to object inside of the div with the mouseover event?
Long story short I ne开发者_运维百科ed to make a mouseout event not trigger on nested items.
Thanks in advance.
Instead of using mouseout you may go this way:
- when blocking the UI by overlaying the page with the blank div observe the mouseover-event of the wrapper-div
- When mouseover fires on the wrapper-div start observing the mouseover-event of the blank div
- When the mouseover fires on the blank div reset the page(remove the blank div)
The approach should be clear, if the mouse is over the blank div it must be outside the wrapper-div.
精彩评论