Change Title to display tooltip

I am doing email validation using toolTip to display the message. If first the guy puts registered email the search is made and displayed the message that the "registered email", if he changes the email to one that is not registered the message should be "Email available", but even if he changes the email to available the message remains. how do I get it changed? Note: if the shape is different (email available) the message is displayed saying that the email is available, and if it changes to one that exists the message "email available" is retained. So my problem is being in the title.

    //validação de email
    $(function validateEmail() {
        $('#Email').change(function () {
            var url = '@Url.Action("ValidateEmail", "Ajax")';//url do controller que passará a informação
            var email = $('#Email').val();
            $.ajax({
                type: 'POST',
                url: url,
                data: { email: email },
                dataType: 'json',
                success: function (data) {
                    if (data.success==true) {
                        $('.messageTooltip').tooltip({ title: "Email já cadastrado" });
                        //$('#MensagemEmail').text("Email Já Cadastrado");
                        $('#Email').focus();
                    }
                    if (data.success == false) {
                        $('.messageTooltip').tooltip({ title: "Email disponível" });
                    }
                }
            });
        });
    });//Fim da validação de email

As can be seen in the image below, the return is being executed correctly, and in the first was inserted an email not registered, and in the second registered. insert the description of the image here

Author: Fabio Souza, 2016-12-18

1 answers

To change the tooltip you can do as soon as it works^^, it gets lost the way you are doing.

$('#batata').tooltip({ title: "Email já cadastrado" })

setTimeout(function(){
  $('#batata').attr("data-original-title", "batata")
},3000)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" />
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>

<br><br>
<br><br>
<br><br>
<input id="batata" />
 1
Author: Marco Vinicius Soares Dalalba, 2016-12-19 12:55:56