So, I've got a scheme here like the FAQ that the site administrator who registers the Faqs. Each new registered question generates two new divs:
<div>Pergunta1</div>
<div>Resposta1</div>
So I use a Jquery to do the toggle effect. When the person clicks on the question it displays the answer:
$(function(){
$('#pergunta1').click(function(){
$('#respota1').toggle(700);
});
Only in the media that the question and answer divs are added I have to add jQuery manually.
If you register another:
<div>Pergunta2</div>
<div>Resposta2</div>
Then I would have to do another Jquery shown up there by changing it ...
$(function(){
$('#pergunta2').click(function(){
$('#respota2').toggle(700);
});
Would it be like jQuery to automate this? Like a while or something?