I have a checkbox in a table:
<td>
<input name="feature1" type="checkbox" value="1"/>
</td>
I want this checkbox uncheckable what's better way to do this? Since I do not want to use prop.("disabled"), cause it will turn checkbox to the gray.
Then I try to use :
$('input[type="checkbox"][name="feature1"]:first').on("click", true)
but if I want to turn this checkbox checkable again, and click the checkbox
$('input[type="checkbox"][name="feature1"]:first').on("click", true)
it will send error like this : jquery-2.2.4.min.js:3 Uncaught TypeError: ((n.event.special[g.origType] || {}).handle || g.handler).apply is not a function at HTMLInputElement.dispatch (jquery-2.2.4.min.js:3:7537) at r.handle (jquery-2.2.4.min.js:3:5620)
Just new to Jquery, is there a better way to set up this ?