after adding events both mouseenter and mouseleave,click the element(the times of click is uncertain),the mouseenter and mouseleave will be triggered.
I try chrome 62.0.3202.94(32),firework,IE,and it only happened on chrome.Is it a bug of chrome,or just something wrong with my code?
The example online:http://runjs.cn/code/cbb0aw1a
the code follows there:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h4>click on the parent part,then see the console </h4>
<div class="parent" style="width: 100%;height: 100px;background-color: #ddd">
<div class="children" style="width: 50px;height: 50px;background-color: #d9534f;cursor: pointer">
test
</div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
<script>
$(".parent").mouseenter(function () {
console.log("enter")
}).mouseleave(function () {
console.log("leave")
});
</script>
</html>