.prop ("checked", false) does not work

1

Good afternoon, I need help with a checkbox, which I have in a modal. when the modal closes I want the checkbox to be unchecked and I tried many options and nothing works.

$('#Matutino').prop('checked', false).checkboxradio('refresh');
$('input[name="Matutino"]').removeAttr('checked');
$('input[name="Matutino"][value="1"]').removeAttr("checked").trigger("change");
$('#Matutino').prop('checked', false).

and how can I make a div appear as destabilized. Thanks for your help

    
asked by Irais_Rivero 26.09.2017 в 00:53
source

1 answer

0

Because you do not only use an anonymous function, it is something similar to this, I use it to validate my login, but instead of the button control it only takes the instruction $ ('# Matutino'). prop ('checked', false) ;

NOTE YOUR ESCRIPT LABEL PUT THE LAST

 <script>
    $(function () {
        $("#txtusername").on("change", function () {
            $eval = $("#txtusername").val();
            $eval2 = $("#txtPass").val();
            $btnval = $('#btnStartLogin');
            if ($eval != "" && $eval2 != "") {
                $("#btnStartLogin").show();
                $("#btnStartLogin").prop("disabled", false);
            }
            else if ($eval == "" && $eval2 != "") {
                $("#btnStartLogin").prop("visible", false);
                $("#btnStartLogin").prop("disabled", true);
            }
            else if ($eval != "" && $eval2 == "") {
                $("#btnStartLogin").prop("visible", false);
                $("#btnStartLogin").prop("disabled", true);
            }
            else if ($eval2 == "" && $eval == "") {
                $("#btnStartLogin").hide();
                $("#btnStartLogin").prop("disabled", true);
            }
        });

    
answered by 26.09.2017 в 01:55