I have this table:
<tbody class="schoolsRows">
<tr>
<td width="50%">
<input type="text" class="classA schoolNameClass valid" id="1">
</td>
<td width="25%">
<input type="text" class="classA postCodeClass valid" id="2">
</td>
<td width="25%">
<input type="text" class="classA urnClass valid" id="3">
</td>
<td>
<input type="button" value="Clear Content" onclick="clearRowContent(this)">
</td>
</tr>
</tbody>
On button click, I am trying to reach to each of the textboxes and clear it.
Here is my javascript code:
function clearRowContent(e) {
var row = e.closest('tr');
var textBoxToClear = row.find('.schoolNameClass');
}
I can get to the row, but the problem is when I try to get to the textboxes by using find or siblings I get this error
Uncaught TypeError: row.find is not a function
I wonder why is this happening.