Question: I am disabling the submit button #myButton after i execute an api call doAjax();

```
    $("#myButton").click(function (e) {
    doAjax();
    $('input:submit').attr("disabled", true);
});

```

But it wont enable after the callback .. i want to enable it if the call back meets a certain criteria i.e.

```
 $.ajax({
    type: "GET",
    url: "api5.php",
    data: dataString,
    dataType: "json",

    //if received a response from the server
    success: function (response) {
    var status = response.status;
enter code here
if ((status == 'READY' && response.endpoints[0].statusMessage == 'Ready')) { 
$('input:submit').attr("disabled", false);

```

doesn't seem to work though.. button stays disabled.

Answer: 
Are you sue the your if block is getting executed ? Try doing console.log or alert inside the if block. Also, try the following :

```
$('input:submit').removeAttr('disabled');

```

or you can also try input[type=submit] as the selector or give a class or id and make it selector.
Try : `$(el).prop('disabled', false)`