<head>
    <meta charset="UTF-8">
    <title>연결가능 이벤트</title>
    <script src="../RESOURCES/asset/js/jquery-3.6.0.min.js"></script>
    <style>
        .outer{
            margin: 50px;
            width: 200px;
            height: 200px;
            background-color: aquamarine;
        }
        .inner{
            margin: 25px;
            width: 150px;
            height: 150px;
            background-color: green;
            position: absolute;
        }
    </style>

</head>
<body>
    <h1>연결가능 이벤트</h1>
    <h3>마우스 관련 이벤트</h3>
    <div class="outer">
        <div class="inner"></div>
    </div>
    <script>
        $(function(){
        /*    $('.outer').on('mouseenter',function(){
                console.log("Enter 발생!!");
            });
            $('.outer').on('mouseleave',function(){
                console.log("Leave발생!!");
            });
            */arguments
            $('.outer').on('mouseout',function(){
                console.log("out 발생!!!")
            });
            $('.outer').on('mouseover',function(){
                console.log("Over 발생!!")
            });
        });
    </script>

'JQUERY > 함수' 카테고리의 다른 글

키보드관련//글자수세기  (0) 2022.08.28
hover()  (0) 2022.08.28
이벤트 연결함수...on.off  (0) 2022.08.28
요소 복사,삭제태그들....clone(),remove()  (0) 2022.08.28
요소추가. append, prepend, before, after  (0) 2022.08.28

+ Recent posts