<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title</title>
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<style>
.red-txt{
color:red;
}
</style>
</head>
<body>
<p class="txt">toggleclass 는 addclss와 removeelwkegapthemdlq</p>
</body>
<script>
const interval = setInterval(()=>{
$(".txt").toggleClass("red-txt");
},1)
</script>
</html>
댓글 영역