Код ниже работает только для первого div. Я не могу отобразить другие div, когда я нажал на другие "img"
Вы знаете способ достижения второго (следующего) элемента?
$(document).ready(function() {
$('.imgOpenClose').click(function() {
if ($(this).attr("src") == "images/openTree.gif") {
$(this).attr("src", "images/closeTree.gif");
$(this).parent().find('div').eq(0).show();
}
else {
$(this).attr("src", "images/openTree.gif");
$(this).parent().find('div').eq(0).hide();
}
});
});

