<input type="checkbox" name="feature1" value="0" />
If checked, value=”1″;
else value=”0″;
if ( $('input[name=feature1]').is(':checked') ) {
$('input[name=feature1]').val('1');
}
I think the above jQuery may work, but its one-time check, how do I make it that everytime the checkbox is clicked/checked, value becomes 1, else 0?
Many thanks
or
or
much better
and just as I thought there is still a much better way..