HTML

&lt;div class="inline actionset"&gt;
   &lt;div&gt;1&lt;/div&gt;
    &lt;button&gt;change&lt;/button&gt;
&lt;/div&gt;
&lt;div class="inline actionset"&gt;
    &lt;div&gt;2&lt;/div&gt;
    &lt;button&gt;change&lt;/button&gt;
&lt;/div&gt;


CSS

.inline {
    display:inline-block;
}
.highlight {
    background: red !important;
}
.actionset &gt; div {
    background: black;
    width: 100px;
    height: 50px;
    color: white;
}


JS

$('.actionset button').on('click', function (e) {
    var $this = $(this);
    var el = $this.prev();
    el.toggleClass('highlight');
});


http://jsfiddle.net/dkhhecf2/2/


An ID can only be used once per page
Your markup needed some help to clean it up


As for the JS, you have a reference to the element being clicked $(this). Using this you can traverse the DOM using jQuery to select the element you want to affect. I used prev(); . 

Combine jQuery .addClass() on button click only to element that button is in
I'm getting some errors when I try to compile my design in Aldec's Active-HDL. 

# Warning: ELAB1_0026: BITADJ128.bde(BITADJ128.vhd) : (79, 0): There is no default binding for component "buf". (No entity named "buf" was found).
# Warning: ELAB1_0026: BITADJ128.bde(BITADJ128.vhd) : (157, 0): There is no default binding for component "INV". (No entity named "INV" was found).
# Warning: ELAB1_0026: BITADJ128.bde(BITADJ128.vhd) : (277, 0): There is no default binding for component "GND". (No entity named "GND" was found).


I have added these items to the library multiple times, and in different ways, but it still gets hosed up. I'm wondering if anyone else has had a similar issue? I inherited a large design I'm converting from EDIF to VHDL and switching from Virtex-4 to Virtex-5, and there seems to be a symbol resolution problem. 
