Previously, I always thought that the Mouseover and mouseout events in jquery are equivalent to hover events. There is no difference between the two. They should be the same. However, I was only able to see an animated effect yesterday. These two cannot be the same.
<Div class = "wrapper">
<Div class = "IMG"> </div>
<Div class = "text"> </div>
</Div>
<Div class = "point"> </div>
Add events to wrapper. When you move the mouse over wrapper, the layer of class = "point" is enlarged. However, if the Mouseover and mouseout events are used, the point layer will become larger when the mouse moves to the wrapper layer,
However, when the mouse moves between the IMG and text layers, the point layer will become larger and smaller, changing constantly. This is not the result we want. What we want is to move the mouse over the wrapper layer,
Whether it is IMG or text, the point becomes larger, but the point layer remains small if the mouse is not removed from the wrapper layer.
The idea is clear, so we can solve the hover problem without using Mouseover and mouseout.
It took us a long time to solve such a simple problem. Write logs to commemorate.
Supplement: My master said that there is such a section in jquery source code:
Hover: function (fnover, fnout ){
Return this. mouseenter (fnover). mouseleave (fnout | fnover );
}
That is, hover! = Mouseover + mouseout. But hover = mouseenter + mouseleave.