IT 국비 교육
쌍용교육센터 - 42일
2024.04.17 on 메서드를 이용한 이벤트 연결$(function(){ //하나의 이벤트 연결 //이벤트 타입 $('h1').on('click',function(){ $(this).html(function(index,html){ return html+'+'; }); }); //복수의 이벤트 연결 $('h1').on({ mouseover:function(){ $(this).addClass('reverse');//클래스 추가 }, mouseout:function(){ $(this).removeClass('reverse');//클래스 추가 } });}); 동적으로 생성된 태그에 이벤트 연결 $(function(){ //현재 존재하는 태그뿐만 아니라 미래에 새로 생성되는 태그에..
2024. 4. 17. 17:43