Reputation: 3
Right now I have .clrChart hidden and want to unhide with click on .color but have multiple of these in a row so I need to target the one under the click.
<div class="color">
<a><img src="img/clrBttn.png" alt="" /></a>
<a href="#"><img src="img/clrChart2.jpg" alt="color chart" class="clrChart" /></a>
</div>
I have tried this w/ no avail.
$('.color').click(function() {
$(this).next('.clrChart').show();
});
any help would be greatly appreciated:)
Upvotes: 0
Views: 179
Reputation: 39268
$('.color').click(function() {
$(this).find('.clrChart').show();
});
This will find a descendant inside the current .color
Upvotes: 1