1
I’m using the function toggle of jQuery, is working perfectly, but I put 12 Divs with text and when I click to open only one, all are opening.
Follows the code of Javascript:
<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 this, when I click on a div, will expand the text only from her and when I open the other div with other text information, will close the previous and open only this.
What is happening is that by clicking the button to open the text, opens all div, i.e., the toggle is picking up on all.
guy edits the question and cloca tb your HTML code, will make it easy to answer you!
– hugocsl