error placement - remove "has-success" class if input field is empty and still green border occures
unhighlight : function(element,errorClass, validClass) {
if ($(element).parent().hasClass('has-error')) {
$(element).parent().addClass("has-success").removeClass("has-error");
$(element).next('.FeRror').css('display','none');
}
//console.log($(element).val());
//console.log($(element).val() == "");
if ($(element).parent().hasClass('has-error')) {
$(element).parent().addClass("has-success").removeClass("has-error");
$(element).next('.FeRror').css('display','none');
}
//console.log($(element).val());
//console.log($(element).val() == "");
if($(element).val() == "") {
$(element).closest('.hase-error').removeClass("has-error");
$(element).closest('.has-success').removeClass("has-success");
}
Comments
Post a Comment