So I have this button, you click it and it changes the background color from blue to red. If I wanted to have that button change the row background color instead, how would I do that? This is in a loop too so all the classes are the same, I use the below code so it only changes whatever I clicked instead of everything with that class.
script
<script type="text/javascript">
$('.a-row').on('click', '.H', function () {
$( this ).css( "background-color", "red" );
});
</script>
html/php
<tr class="a-row">
<td><p class="pname"><?=$row["Name"]?></p><p class="clickbutt H">H</p></td>
<td>stuff</td>
<td>stuff2</td>
<td>stuff3</td>
</tr>