i have a few buttons:
<button class="image1-button"><img src="images/button_unselected.png"></button>
<button class="image1-button"><img src="images/button_unselected.png"></button>
<button class="image1-button"><img src="images/button_unselected.png"></button>
<button class="image1-button"><img src="images/button_unselected.png"></button>
when i press one of them the following happen:
$(".image1-button").click(function(){
$(this).find("img").attr("src", "images/button_selected.png");
});
how can i say that the other, means not(this) get the src “images/button_unselected” that always only the currently pressed button has “button_selected”
thank you!
Like this: