I\'m using this:
jQuery(\'.class1 a\').click( function() {
if ($(\".class2\").is(\":hidden\")) {
$(\".class2\").slideDown(\"slow\");
} else {
$(\
In the click event "this" is the a tag that was clicked
jQuery('.class1 a').click( function() {
var divToSlide = $(this).parent().find(".class2");
if (divToSlide.is(":hidden")) {
divToSlide.slideDown("slow");
} else {
divToSlide.slideUp();
}
});
There's multiple ways to get to the div though you could also use .siblings, .next etc