<div class="box1">
<p class="title">내용보기</p>
<div class="txt" style="display:none">
more...
</div>
</div>
.box1{}
.title{display:inline-block; cursor:pointer;}
$('.title').click(function(){
$(this).toggleClass('active');
$('.txt').toggle();
return false;
});
기본적인 형식의 toggle 방식
https://codepen.io/leechaewon/pen/MWObxMq
2022.07.04 ( toggle 추가)