I am trying to do some jquery manipulation. I have a modal popup and checkbox in it, and I use jquery to control checked mode. There is a variable that has either True or False, so if its True then check the box otherwise. But in my case, even if the value is False, the checkbox still remains checked. This is the code I'm using:
$(document).on("click", ".open-EditCC", function () { var life = $(this).data('life'); $('#<%=chkLife.ClientID%>').attr('checked', life); $('#editCC').modal('show'); });
the life variable gets either True or False, but all the time when the checkbox is checked, I set a breakpoint, I see that the value is False. Any idea what I'm doing wrong? Thanks in advance, Laziale
source share