Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- IntersectionObserver
- ES6
- 클로저
- dom
- Push
- 스크롤
- ajax
- Flex
- input
- 문자열
- event
- scroll
- 애니메이션
- slice
- async
- 이벤트 루프
- 모듈
- json
- 이벤트 위임
- 배열
- array
- 고차함수
- This
- animation
- Promise
- ios
- object
- 비동기
- video
- 이벤트
Archives
- Today
- Total
목록커스텀 이벤트 (1)
FEDev Story
커스텀 이벤트 디스패치
https://ko.javascript.info/dispatch-events const allView = document.querySelector('.selectbox'); const category = document.querySelector('.category'); const dimDiv = document.querySelector('.dimmed'); const customEvent = document.createEvent('Event'); customEvent.initEvent('click', false, true); allView && allView.addEventListener('click', (e) => { category.classList.toggle('active'); dimDiv.cla..
Javascript
2021. 8. 18. 15:54