I have a cell with a class called OnHandClass. I have an input field inside the cell and I have added a double click event to the cell and have tried many ways to change the visibility of the closest input element. Three are listed below. What am I missing ?
<input type="text" class="OnHandEditClass" value="1" style="display: none;">
<td class="OnHandClass">
1
<input type="text" class="OnHandEditClass" value='1'>
</td>
$('.OnHandClass').dblclick(function (evt) {
$(this).next(":text").css("display", "inline");
$(this).next("input[type='text']").show();
$(this).closest('input').css("display", "inline");
});
OnHandEditClass, notOnHandClass.OnHandClass. Presumably the input is in a table cell however the OP failed to include that code if it is.