Damien
0
Q:

jquery checkbox change event

//jQuery listen for checkbox change
$("#myCheckBoxID").change(function() {
    if(this.checked) {
        //I am checked
    }else{
        //I'm not checked
    }
});
8
$(document).ready(function() {
    //set initial state.
    $('#textbox1').val($(this).is(':checked'));

    $('#checkbox1').change(function() {
        if($(this).is(":checked")) {
            var returnVal = confirm("Are you sure?");
            $(this).attr("checked", returnVal);
        }
        $('#textbox1').val($(this).is(':checked'));        
    });
});
3

New to Communities?

Join the community