function buttonAnimation(currentKey) {
var activeButton = document.querySelector("." + currentKey);
activeButton.classList.add(".pressed");
setTimeout(function() {
activeButton.classList.remove("pressed");
}, 100);
setTimeout (function, milliseconds, param1, param2, ...)
funct
function buttonAnimation(currentKey) {
var activeButton = document.querySelector("." + currentKey);
activeButton.classList.add(".pressed");
setTimeout(function() {
activeButton.classList.remove("pressed");
}, 100);
setTimeout (function, milliseconds, param1, param2, ...)
function: required - the function that will be executed
milliseconds: optional. The number of milliseconds to wait before executing the code. If omitted, the value 0 is used
param1, param2, ... : optional. Additional parameters to pass
'프로그래밍 공부 > 프론트엔드' 카테고리의 다른 글
Bootstrap : 만들고 싶은 홈페이지 템플릿 가져오기 (0) | 2022.03.05 |
---|---|
티스토리로 다시 돌아온 이유: 갤탭 (0) | 2022.02.27 |
웹개발/ JavaScript: Constructor Function (0) | 2022.02.18 |
생활코딩/Python 제어문 - 5.2. 반복문 - 다차원배열의 처리 (0) | 2021.10.14 |
생활코딩/ Python 조건문4 중첩조건문 (0) | 2021.10.14 |