I'm using the toggle function of jQuery , it's working perfectly, however I put 12 divs with text and when I click open only one, all are opening.
Follow the JavaScript code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><script>$(document).ready(function(){$("span.seta-baixo").click(function(){
$("p.perguntas-conteudo").toggle();
});
});
</script>
What I want is the following when I click on a div , it will expand the text only from it and when I open the other div with other text information , will close the previous one and open only this one.
What is happening is that by clicking the button to open the text, it opens all the div , ie the toggle is catching on all. >