I have a small piece of jQuery that I need a bit of help with. Here's what I have:
jQuery:
jQuery(".disableUser").click(function() {
jQuery(".enableUser").show()
jQuery(".disableUser").hide();
});
jQuery(".enableUser").click(function() {
jQuery(".disableUser").show()
jQuery(".enableUser").hide();
});
HTML:
<tr>
<td></td>
<td></td>
<td></td>
<td><span class="disableUser">Disable this user</span><span class="enableUser">Enable this user</span></td>
</tr>
.enableUser is set to display:none as default.
As you can see, it is simply hiding or showing an element. My issue is that there are rows in a table, with each row having the same two elements. When I click one row's element it hides or shows all the row's element. I only want it to affect the specific element I am clicking on and not all elements with the same class. I have tried the info found here: http://css-tricks.com/snippets/jquery/click-once-and-unbind/, but I am not sure if I am understanding it or using it correctly.