Dev/JQUERY
jQuery mouse관련 이벤트(hover)
샤해
2013. 1. 14. 16:48
기본적으로 mouseover, mouseout 등이 있지만,
mouseover를 대체할만한 mouseenter도 있다. (차이점은 아직 모르겠다.)
mouseout과 비슷한 기능인 mouseleave도 있는데 out은 잘 안먹힐때가많아서 leave를 주로 쓴다.
또한!!
mouseenter와 mouseleave를 합쳐놓은 핸들러(hove)도 있다.
기본적인 사용법으로는 다음과 같다.
$('#nav> ul').hover(function(){
//in 했을경우 이벤트 처리
},function(){
//out 했을경우 이벤트 처리
});