I'm having a problem with my code. There's no error in Chrome's console but it doesn't work. I wanted to count the password characters entered. The condition is that the password must be a minimum of 6 characters.
$(document).ready(function() {
$(".submit").click(function() {
if($('#regform input[type="password"]').val().length > 6) {
$('.error').html('Must have a min of 6 chars');
$('.error').css("display","block");
}
}
});
Can anyone explain it for me?