TIL * 22.02.04

RIHOยท2022๋…„ 2์›” 4์ผ
0

TIL

๋ชฉ๋ก ๋ณด๊ธฐ
5/13
post-thumbnail
post-custom-banner

๐Ÿ”ถ JS

    if(h1.classList.contains(clickedClass)) {
        h1.className = "";
    } else { 
        h1.className = clickedClass;
    }
}

classList: HTML์˜ elements์— ๋ช…์‹œํ•œ class๊ฐ€ ๋“ค์–ด์žˆ๋Š”์ง€ ๊ฒ€์‚ฌ

function handleTitleClick() {
    h1.classList.toggle('clicked')
}

toggle: h1์˜ class๋กœ clicked๊ฐ€ ์žˆ์œผ๋ฉด ์ œ๊ฑฐํ•˜๊ณ , ์—†์œผ๋ฉด ์ถ”๊ฐ€

function onLoginSubmit(tomato) {
    tomato.preventDefault();
    console.log(tomato);
}

preventDefault: event์˜ ๊ธฐ๋ณธ ํ–‰๋™์ด ๋ฐœ์ƒํ•˜์ง€ ์•Š๋„๋ก ๋ง‰์Œ



๐Ÿ”ท CSS

transition : CSS ์†์„ฑ์„ ๋ณ€๊ฒฝํ•  ๋•Œ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์†๋„๋ฅผ ์กฐ์ ˆํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ œ๊ณต



๐Ÿ’ซ Github

git add *
๋ชจ๋“  ํŒŒ์ผ์˜ ๋ณ€๊ฒฝ์ ์„ git ์ธ๋ฑ์Šค(์ž„์‹œ ์ €์žฅ ์œ„์น˜)์— ์ €์žฅ.

git commit -m "commit message"
ํŒŒ์ผ์˜ ์ถ”๊ฐ€ ๋ฐ ๋ณ€๊ฒฝ์ ์„ ์ €์žฅ์†Œ์— ๊ธฐ๋ก.

git remote add origin https://github.com/myid/repo-name
origin์ด๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ์›๊ฒฉ ์ €์žฅ์†Œ ๋“ฑ๋ก.

git push origin master
๋กœ์ปฌ ์ €์žฅ์†Œ์˜ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์›๊ฒฉ ์ €์žฅ์†Œ์— ๋ฐ˜์˜.


์›๋ž˜๋Š” github Desktop์„ ์‚ฌ์šฉํ–ˆ์œผ๋‚˜, ์—ญ์‹œ ๋ช…๋ น์–ด๋ฅผ ์ตํ˜€๋‘๋Š” ๊ฒƒ ๋˜ํ•œ ์ค‘์š”ํ•  ๊ฒƒ ๊ฐ™๋‹ค. ์ฐจ๊ทผ์ฐจ๊ทผ ์ˆ™์ง€ํ•ด๊ฐ€์ž.

profile
Front-End / ๊ธฐ๋ก์šฉ
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€