Prevent checkbox from ticking/checking COMPLETELY

前端 未结 13 634
醉梦人生
醉梦人生 2020-12-09 07:48

I have been asked to disable the \"ticking\" of a checkbox. I am not being asked to disable the checkbox, but to simply disable the \"ticking\".

In other w

13条回答
  •  醉话见心
    2020-12-09 07:59

    From my point of view it is as simple as:

    $(this).prop('checked', !$(this).prop('checked'));
    

    Works both for checked and unchecked boxes

提交回复
热议问题