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).val() == "") { 
                    $(element).closest('.hase-error').removeClass("has-error");
                          $(element).closest('.has-success').removeClass("has-success");
                          }

Comments

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request

Invalid bean property or is not readable to loading Jsp page