mouseenter, mouseleave / on

2022. 1. 1. 12:31javascript

        $(document).on({
            mouseenter: function () {
                $(this).addClass('border-primary');
                $(this).addClass('border-2');
                $(this).addClass('fw-bold');
            },
            mouseleave: function () {
                $(this).removeClass('border-primary');
                $(this).removeClass('border-2');
                $(this).removeClass('fw-bold');
            }
        }, '.sideNavDiv');

'javascript' 카테고리의 다른 글

onlynum  (0) 2022.01.10
jq ajax  (0) 2022.01.09
최대값, 최소값  (0) 2021.12.30
창 크기, 모니터 크기  (0) 2021.12.30
ajax 이후 hover 이벤트  (0) 2021.12.14