<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>test</title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
<p class="main" style="width:100px;height: 200px;background: red;"></p>
<script>
$(".main").mouseleave(function() {
alert(0)
})
</script>
</body>
</html>
At first I thought it was a conflict with the click event in .main, but I found that continuous clicks of the mouse will also trigger the mouseleave event
.
Please tell me if you have any solution.
My continuous mouse clicks here did not trigger the mouseleave event. You can put the code to see http://runjs.cn/code
If you simply click the left button continuously, there is no problem, but if you click the right button or alternate left and right, some situations may occur because the menu is called out