Skip to content

Commit 34c9b7b

Browse files
committed
Merge pull request posabsolute#804 from iskander78/patch-2
Update jquery.validationEngine.js
2 parents f2862d9 + a4e05d0 commit 34c9b7b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

js/jquery.validationEngine.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
$(document).on("click", ".formError", function() {
2929
$(this).fadeOut(150, function() {
3030
// remove prompt once invisible
31-
$(this).parent('.formErrorOuter').remove();
32-
$(this).remove();
31+
$(this).closest('.formErrorOuter').remove();
3332
});
3433
});
3534
}
@@ -207,8 +206,7 @@
207206
closingtag = methods._getClassName($(this).attr("id")) +"formError";
208207
}
209208
$('.'+closingtag).fadeTo(fadeDuration, 0.3, function() {
210-
$(this).parent('.formErrorOuter').remove();
211-
$(this).remove();
209+
$(this).closest('.formErrorOuter').remove();
212210
});
213211
return this;
214212
},
@@ -221,8 +219,7 @@
221219
var options = form.data('jqv');
222220
var duration = options ? options.fadeDuration:300;
223221
$('.formError').fadeTo(duration, 300, function() {
224-
$(this).parent('.formErrorOuter').remove();
225-
$(this).remove();
222+
$(this).closest('.formErrorOuter').remove();
226223
});
227224
return this;
228225
},
@@ -1676,7 +1673,6 @@
16761673
"opacity": 0
16771674
},function(){
16781675
prompt.closest('.formErrorOuter').remove();
1679-
prompt.remove();
16801676
});
16811677
}, options.autoHideDelay);
16821678
}
@@ -1734,8 +1730,7 @@
17341730
var prompt = methods._getPrompt(field);
17351731
if (prompt)
17361732
prompt.fadeTo("fast", 0, function() {
1737-
prompt.parent('.formErrorOuter').remove();
1738-
prompt.remove();
1733+
prompt.closest('.formErrorOuter').remove();
17391734
});
17401735
},
17411736
closePrompt: function(field) {

0 commit comments

Comments
 (0)