Today, I encountered the problem of how jquery removed hover. At first I thought that it could be done directly by unbind ("hover"), but I failed to pull it for half a day. Baidu also searched a lot about jquery's unbind for the hover event, and found the correct method on a foreigner's blog. Now I love the micro-network to share what I said on the Internet.There are several methods for jquery to cancel a hover event::
Copy codeThe Code is as follows:
/* This method is incorrect */
$ (# Hover_div). unbind (hover );
/* This method is also incorrect */
$ (# Hover_div). unbind (mouseover). unbind (mouseout );
/* This method is newly added and cannot be used in earlier versions */
$ (# Hover_div). unbind (mouseenter mouseleave );
/* This method is correct, and new and old versions are available */
$ (# Hover_div). unbind (mouseenter). unbind (mouseleave );