I am a newbie when it comes to jquery and am getting muddled on my problem. Basically what I need to do is when the button is clicked, all checkbox within that column should be disabled, meaning i cannot check/uncheck it. I have searched and found this post as the closest one related to my problem but he's already advanced in terms of using jquery and providing only his' pseudo code.
Can anyone help me with my problem? Below is my code:
<table id="key_table" border="3">
<thead>
<tr>
<th>
Month 1<button id="1" class="lockButton">Lock</button><br>2013-01-01 to 2013-01-31<br>
<table style="width: 250px;">
<tbody>
<tr class="odd">
<td style="text-align:center;">1</td>
<td style="text-align:center;">2</td>
<td style="text-align:center;">3</td>
<td style="text-align:center;">4</td>
</tr>
</tbody>
</table>
</th>
<th>
Month 2 <button id="2" class="lockButton">Lock</button><br>2013-02-01 to 2013-02-28<br>
<table style="width: 250px;">
<tbody>
<tr class="odd">
<td style="text-align:center;">1</td>
<td style="text-align:center;">2</td>
<td style="text-align:center;">3</td>
<td style="text-align:center;">4</td>
</tr>
</tbody>
</table>
</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="width: 250px;">
<table>
<tbody>
<tr class="odd">
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_460853mo_1" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_460853mo_1" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input checked="checked" style="width: 15px !important;" class="kw_460853mo_1" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_460853mo_1" type="checkbox"></td>
</tr>
</tbody>
</table>
</td>
<td style="width: 250px;">
<table>
<tbody>
<tr class="odd">
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_460853mo_2" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_460853mo_2" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_460853mo_2" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_460853mo_2" type="checkbox"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr class="even">
<td style="width: 250px;">
<table>
<tbody>
<tr class="odd">
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_456905mo_1" onclick="javascript: update_key_type(456905, 1, 1, this)" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input checked="checked" style="width: 15px !important;" class="kw_456905mo_1" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_456905mo_1" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_456905mo_1" type="checkbox"></td>
</tr>
</tbody>
</table>
</td>
<td style="width: 250px;">
<table>
<tbody>
<tr class="odd">
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_456905mo_2" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_456905mo_2" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_456905mo_2" type="checkbox"></td>
<td style="text-align:center;width:100px !important;"><input style="width: 15px !important;" class="kw_456905mo_2" type="checkbox"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
You can also check here on JSFiddle