
08/04/2009, 08:52
|
 | | | Fecha de Ingreso: enero-2006
Mensajes: 139
Antigüedad: 19 años, 1 mes Puntos: 1 | |
Serealizar toggle Tengo esta cuestión...
Código:
<script type="text/javascript">
$(document).ready(function () {
$('div.answer').hide(); // Oculto todas las preguntas
$("#question_123").click(function() { $("#answer_123").toggle(); });
$("#question_739").click(function() { $("#answer_739").toggle(); });
});
</script>
Código:
<div class="questions">
<div class="question" id="question_123">Pregunta ,,,,,,,, </div>
<div class="answer" id="answer_123">Respuesta.....</div>
<div class="question" id="question_739">.......</div>
<div class="answer" id="answer_739">........</div>
</div>
Mi pregunta: como puedo hacer para no tener que poner un toogle por cada pregunta y respuesta? |