I am creating a checklist and have placed all the bullet points in a table. I also have a button after the table that sets the html of the checkboxes to a space -
I would like this check box to reset the click counter of the check boxes, how can I do that?
Here is the code for the scripts.
<SCRIPT LANGUAGE="javascript">
$(document).ready(function(){
$(".chk").toggle(function() {
$(this).html('✔'); },
function() {
$(this).html(' ');
}
);
});
</SCRIPT>
<SCRIPT LANGUAGE="javascript">
$(document).ready(function(){
$("#clear").click(function() {
$(".chk").html(' ');
}
);
});
</SCRIPT>
And this is the html that is affected.
<table id="chkList" border="1">
<tr><td class="chk"> </td><td>CDP is working on HFP ports</td></tr>
<tr><td class="chk"> </td><td>View device logs to look for unexpected errors</td></tr>
<tr><td class="chk"> </td><td>Verify interface counters </td></tr>
<tr><td class="chk"> </td><td>Traffic levels are comparable before and after
<tr><td class="chk"> </td><td>Error counts are at acceptable levels
<tr><td class="chk"> </td><td>Verify MAC table for CFP port is comparable to pre-maintenance snapshot
<tr><td class="chk"> </td><td>Verify spanning tree root output matches snapshot taken prior to implementation</td></tr>
<tr><td class="chk"> </td><td>Verify QoS counters</td></tr>
<tr><td class="chk"> </td><td>Traffic levels in expected classes look correct for different service types</td></tr>
<tr><td class="chk"> </td><td>Ensure that queue allocated bandwidth is not being overrun</td></tr>
<tr><td class="chk"> </td><td>Verify queues are being used as expected</td></tr>
<tr><td class="chk"> </td><td>Tail drops are at acceptable levels</td></tr>
<tr><td class="chk"> </td><td><strong>sh policy-map interface x/x</strong></td></tr>
<tr><td class="chk"> </td><td><strong>sh int x/x</strong></td></tr>
<tr><td class="chk"> </td><td>Verify markings for DSCP and CoS are correct</td></tr>
<tr><td class="chk"> </td><td><strong>sh platform qos statistics int x/x</strong> (ME-3400 specific command)</td></tr>
<tr><td class="chk"> </td><td>Final Verification of the QoS configuration</td></tr>
<tr><td class="chk"> </td><td>Policer set to the correct rate i.e. CIR BC</td></tr>
<tr><td class="chk"> </td><td>Correct bandwidth statements</td></tr>
<tr><td class="chk"> </td><td>Interface descriptions are standardized</td></tr>
<tr><td class="chk"> </td><td>Call the CB NOC to notify them that customer X is complete:</td></tr>
<tr><td class="chk"> </td><td>Have them verify there are no ongoing alarms</td></tr>
<tr><td class="chk"> </td><td>Verify the device status in Solarwinds</td></tr>
</table>
<input type='button' id='clear' value='Clear All' style='margin-top:10px;margin-left:200px;' onClick='' />