$(function() {
$("table.section thead").click(function() {
if ($(this).next("table.section tbody").style.display == "block"){
$(this).next("table.section tbody").slideUp("slow");
}
if ($(this).next("table.section tbody").style.display == "none"){
$(this).next("table.section tbody").slideDown("slow");
}
});
});
Je ne sais pas comment y parvenir, toute aide serait très appréciée.Quel est le problème avec cette fonction Jquery, aide
MISE À JOUR:
Je tentais d'utiliser la fonction suivante.
$(function() {
$("table.section thead").click(function() {
$(this).next("table.section tbody").slideToggle("slow");
});
});
qu'il me donne un problème, (quand il tHead l'effondrement et vous cliquez dessus, il se dilate et s'effondrer là encore, il serait toujours effondrement). C'est pourquoi j'essaie d'obtenir la fonction au sommet.
Que voulez-vous atteindre? –
Je veux un événement click à tous les "table.section thead" donc quand son clic cache le tbody de la table. – Amra