I’m having trouble trying to make this script work. The css changes work fine, but the #error-div does not show up.
Any ideas?
erik
<script type="text/javascript">
$(function () {
$('#rbSubmit').formValidator({
scope: '#form_register',
onError: function () {
if ($('#input_2 input').hasClass('error-input')) {
$('#r2 div, #r2 input' ).css('background-color', '#C1272D').css('color', '#FFF');
$("#error_div").show(); }
else { $('#r2 div' ).css('background-color', '#2F2F2F'); }
}
});
});
</script>
In your question you mention #error-div (with a dash). But in your code you are using #error_div (with an underscore). That might be the problem.