Reputation: 14638
I have a table like following,'
<table id="online_seat">
<tbody id="row_B" class="selected">
<tr class="seat_01 B selected">
<td>B1</td>
<td>
<input id="status_01B" type="text" disabled="disabled">
</td>
</tr>
<tr class="seat_02 B selected">
<td>B2</td>
<td>
<input id="status_02B" type="text" disabled="disabled">
</td>
</tr>
</tbody>
</table>
What I want is I want to remove disabled from every input on page load if the <tr>
has a class selected.
Upvotes: 1
Views: 989
Reputation: 193301
Another variant that should work:
$(function() {
$('tr.selected input:disabled').attr('disabled', false);
});
Upvotes: 1
Reputation: 30175
$('tr.selected input[disabled="disabled"]').removeAttr('disabled');
Code: http://jsfiddle.net/bVu5w/
Upvotes: 4