I have the following code:
echo "<button type=\"button\" class=\"btn btn-link\" onclick=\"personchange('{$row['first_name']}')\">{$row['first_name']}</button>";
What I am trying to do is read all the names from the database and create a button for each name. When a user clicks on a name, I want to call the personchange Javascript function, which works, and add a class to the button that changes the way it looks (so that the user knows which name is currently selected). I know we have to use jQuery to add the class, but how do I know which button I selected in jQuery?