Jam's story
[JQuery] 의사클래스 풍선도움말 본문
1번째 방법
$("div").mouseover(function(event) {
$("div > p:first-child").show();
});
$("div").mouseout(function(event) {
$("div > p:first-child").hide();
});
2번째방법
$("div")
.mouseover(function(event) {
// $("div > p:first-child").show();
$( "p:first-child" , this).show();
})
.mouseout(function(event) {
$("div > p:first-child").hide();
});
3번째방법
$("div").hover(
function(event) { // mouseover
$( "p:first-child" , this).show();
}, function(evnet) { // mouseout
$("div > p:first-child").hide();
}
);
'WEB > JQuery' 카테고리의 다른 글
[JQuery] 스타일 변경 (0) | 2022.05.27 |
---|---|
[JQuery] 버튼 누르면 동작 -전구에 불 끄고 키기 (0) | 2022.05.27 |
[JQuery] 누르면 보이고 사라지고 (0) | 2022.05.23 |
[JQuery] show() hide() (0) | 2022.05.23 |
[JQuery] 모든 a태그에 있는 특정 클래스 제거 (0) | 2022.05.23 |
Comments