lundi 24 octobre 2016

Popups for checking/unchecking a checkbox

I have prompts that produce a popup when a box is ticked and unticked. There looks to be a line of redundant code, but when removed the functions no longer work. So maybe not so redundant:-) But the #id doesn't match to anything (currently set as CAPS to not match)

Any ideas why this is interfering?

$('#checkbox').click(function(){
        if($("#checkbox").is(':checked')){
            if(confirm('Are you sure you want to CONFIRM the order?')){
              $('#CHECKBOX').click();
            }
        }
      });

    $("#checkbox").on('change', function() {
        this.checked=!this.checked?!confirm('Do you really want to change this to NOT RECEIVED?'):true;
    });

http://ift.tt/2e3wyou




Aucun commentaire:

Enregistrer un commentaire