0
I created this function so that when it was clicked, show posts' tags. It works normally but I would like to change the text "open tags" to "Hide tags" when it was clicked, how do I do this?
$(document).ready(function() {
$(".notec").click(function(){
$(".t").slideToggle();
});
});
.t{display: none;}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="tags">
<span class="notec">open tags</span>
<div class="t">
<a href="/">tag 1</a>
<a href="/">tag 2</a>
<a href="/">tag 3</a>
</div>
</div>
You’ve been very helpful, thank you!!
– lua kim