I have an input I am using bootstrap 3 for css
<form>
<div class="row">
<div class="form-group col-md-6">
<label>Número de Filas:</label>
<input type="text" id="no_filasVal" class="form-control">
</div>
</div>
</form>
And I have this jquery code:
$(document).ready(function() {
$("input").focus(function() {
$(this).toggleClass("error");
});
});
Class "error" css:
.error { border-color: #FF0000; }
The question here is because when I put in focus the input does not apply the css class? It applies once that input is not in focus.