You need to use the jQuery-UI method of the button widget to enable it after disabling it: https://api.jqueryui.com/button/#method-enable
btn.button( "enable" );
If you bypass jQuery-UI it will not correctly manage the button state, which is the point of jQuery-UI.