Clicking one button then active another button : I want clicking 1st button then active 2nd button, when active 2nd button then disable 1st button. i write below this code but this code is not working. where is the problem?

    <!DOCTYPE html>
    <html>
    <head>
    <title>Edit Page</title>
    </head>
    <body>
    <input type="submit" name="submit" value="button1" id="bt1">
    <input type="button" name="button" value="button2" id="bt2" disabled="disabled">
    </body>
    <script>
    $(function(){
            $("#bt1").click(function(){
                $(this).attr("disabled", "disabled");
                $("#bt2").removeAttr("disabled");
            });
    
                    $("#bt2").click(function(){
                $(this).attr("disabled", "disabled");
                $("#bt1").removeAttr("disabled");
            });
        });
    </script>
    
    
    </html>

 
