Voglio che la casella di controllo sia spuntata quando sto usando la funzione di commutazione jQuery. Funziona bene quando uso lo .bind('click')
.Checkbox non viene controllato quando si usa jquery toggle
$('#chkb').toggle(function() {
$('#va').text("checked");
$('#chkb').attr('checked', 'checked');
},
function() {
$('#chkb').attr('checked', 'false');
$('#va').text("");
});
html
<input type="checkbox" id="chkb" />
Come posso avere fatto.
Grazie Jean
Che ne dici di questo: var apchk = ''; . \t \t \t \t \t \t \t \t $ ('# c') html (apchk); – X10nD
come * su * quello? –