Jquery command does not work

-1

On my html page, I have the following elements:

<div class="alert alert-danger" role="alert" style="visibility:hidden" id="erro">CNS inválido!</div>
<input type="text" class="form-control" name="cns" maxlength="15" required onblur="erro();" />
<script src="paciente.js"></script>

As the page is very large, I have posted only the main elements that have to do with the problem.

In the patient.js file I only have:

function erro(){
  $("#erro").css('visibitily', 'visible');
};

The js file is loaded normally, but does not display any errors and does not work.

    
asked by anonymous 05.03.2018 / 15:06

1 answer

1

The word visibility is spelled wrong, the correct one would be:

function erro(){
  $("#erro").css('visibility', 'visible');
};
    
05.03.2018 / 15:23