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.