WEB/JQuery
[JQuery] 의사클래스 풍선도움말
애플쩀
2022. 5. 24. 15:19
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();
}
);