asp.net - JQuery check box doesn't keep checked=''checked' -
i updating check box programmatically
$("span[data-id=test] input[type='checkbox']").prop('checked', 'checked');
visually works perfect.
but
- when looking in page source does't set checked=''checked', if manually does.
- it dissapere after postback,
- i can't use in in asp.net in postback events,
i trying different ways:
.prop('checked', true); .attr('checked', 'checked');
the same issues..
'checked=checked'
not ( , not suppose to) on view source. (when modifying dom via js)
you changed dom tree attributes. didn't change html markup !
these kind of changes visible firebug or better , chrome developer toolbar
for "disappear after postback" , not. can't be. input value transferred server. must have else there.
Comments
Post a Comment