Jquery.ValidationEngine - popup removal

Does anyone know how I can remove all generated errors using ValidationEngine with a single command? I added a code snippet that the plugin apparently uses to create pop-ups. If you need more information, please let me know.

The following code generates errors:

buildPrompt : function(caller,promptText,type,ajaxed) { // ERROR PROMPT CREATION AND DISPLAY WHEN AN ERROR OCCUR if(!$.validationEngine.settings){ $.validationEngine.defaultSetting() } deleteItself = "." + $(caller).attr("id") + "formError" if($(deleteItself)[0]){ $(deleteItself).stop(); $(deleteItself).remove(); } var divFormError = document.createElement('div'); var formErrorContent = document.createElement('div'); linkTofield = $.validationEngine.linkTofield(caller) $(divFormError).addClass("formError") if(type == "pass") $(divFormError).addClass("greenPopup") if(type == "load") $(divFormError).addClass("blackPopup") if(ajaxed) $(divFormError).addClass("ajaxed") $(divFormError).addClass(linkTofield); $(formErrorContent).addClass("formErrorContent"); 

Source code: http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/

Problem. When a user has errors on his screen and clicks a link that scrolls to another part of the page, the errors remain in the absolute position.

What I'm looking for: a function that deletes ALL error messages can be more than one.

+7
source share
3 answers
 function removeError(){$(".formError").remove()}; 

It is so simple ... why it took me forever to be outside of me. Removing eerything with a .formError class kills all pop-ups.

+4
source

It also has a predefined function in the verification mechanism.

 $('#formID1').validationEngine('hideAll'); 
+10
source

I use something like this CSS

 .formError{ -moz-animation: cssAnimation 0s ease-in 3s forwards; /* Firefox */ -webkit-animation: cssAnimation 0s ease-in 3s forwards; /* Safari and Chrome */ -o-animation: cssAnimation 0s ease-in 3s forwards; /* Opera */ animation: cssAnimation 0s ease-in 3s forwards; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards;} @keyframes cssAnimation { to { width:0; height:0; overflow:hidden; }} @-webkit-keyframes cssAnimation { to { width:0; height:0; visibility:hidden; }} 

than i add this js

 jQuery(document).on('animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', '.formError', function (e) { e.target.remove(); }); 
0
source

All Articles