//pc 메인메뉴 마우스오버or포커스
$("#header #gnb .m_menu").on('mouseenter focusin', function () {
$(this).children("a").addClass("over");
$("#header").stop().animate({
height: 410
}, 200)
});
//마우스리브or포커스아웃
$("#header #gnb .m_menu").mouseleave(function () {
$("#header #gnb .m_menu a").removeClass("over");
$("#header").stop().animate({
height: 110
}, 200)
})
$("#header #gnb .m_menu:last-of-type").focusout(function () {
$("#header #gnb .m_menu a").removeClass("over");
$("#heade").stop().animate({
height: 110
}, 200)
})
위처럼 mouseenter, focus / mouseleave, focusout 모두 써줘야 한다.
728x90
'퍼블리싱 > HTML | CSS | Javascript' 카테고리의 다른 글
swiper slider custom navigation (0) | 2023.05.15 |
---|---|
text rolling button only css (0) | 2023.05.13 |
display:flex; 에서 min-height를 주면 align-itmes:center;가 안될때 해결방법 (ie) (0) | 2023.05.12 |
input file 커스텀 (0) | 2023.05.12 |
커스텀 selectbox (0) | 2023.05.12 |