2
Voici la fonction jQuery slideToggle:jQuery slideToggle() fonction de rappel
$('.class').click(function() {
$(this).parent().next().slideToggle('slow', function() {
// how can I access $('.class') that was clicked on
// $(this) returns the $(this).parent().next() which is the element
// that is currently being toggled/slided
});
});
Dans la fonction de rappel que je dois accéder à l'élément .class actuel (celui qui est cliqué). Comment puis je faire ça?
Merci :) Je n'ai pas pensé à une solution aussi simple. –