在jquery1.9中替换hover()? [英] replacement for hover() in jquery1.9?
本文介绍了在jquery1.9中替换hover()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用mouseneter mouseleave代替hover().我应该同时使用它们而不是hover()吗?
How do I use mouseneter mouseleave instead of hover(). Should i use them both instead of hover()?
$('#somegrid').hover(
function () {
//something;
},
遗留代码又如何?我的意思是,mouseenter中有什么,mouseleave中有什么?我刚刚对hover()采取了一项行动
What about legacy code - I mean what goes in mouseenter , what goes in mouseleave? i just had one action on hover()
推荐答案
类似-
$('#somegrid').on('mouseenter',function(){
// mouseenter
}).on('mouseleave',function(){
// mouseleave
});
这篇关于在jquery1.9中替换hover()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文