我无法绑定mouseover mouseon事件.
我可以用off来解开它们
$('.overview li a img').off('mouseover mouseon');
Run Code Online (Sandbox Code Playgroud)
但似乎没有用.
$('.overview li a img').on('mouseover mouseon');
Run Code Online (Sandbox Code Playgroud)
有什么建议?
没有mouseon事件.有:
此外,您应该使用处理程序函数来绑定事件:
$(".overview li a img").on("mouseover", function() {
console.log("Mouse is over");
});
Run Code Online (Sandbox Code Playgroud)
这是每次触发事件时执行的函数.