From ba8410588e96fe1c869eff6e7e32ec72797ad6be Mon Sep 17 00:00:00 2001 From: jeffclemens Date: Fri, 17 Oct 2014 11:12:09 -0400 Subject: [PATCH] Restoring namespaced events Namespaced events were added by @thedeerchild here: https://github.com/zurb/foundation/commit/179f3d1fc2a0bc785438ec1a74faf5ef86855f81 Then they were removed here (probably by mistake): https://github.com/zurb/foundation/commit/179f3d1fc2a0bc785438ec1a74faf5ef86855f81 That commit was partially undone here: https://github.com/zurb/foundation/commit/4e164cc29cedf8e9bd5c312483a90f454c69dc72 But the namespaced events weren't restored. This commit re-adds them, as specified in that first commit. Without namespaced events, Abide doesn't act like the Events section of its documentation says it should here: http://foundation.zurb.com/docs/components/abide.html#events --- js/foundation/foundation.abide.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/foundation/foundation.abide.js b/js/foundation/foundation.abide.js index 59f0d069e..9f0c26ba6 100644 --- a/js/foundation/foundation.abide.js +++ b/js/foundation/foundation.abide.js @@ -107,14 +107,14 @@ for (var i=0; i < validation_count; i++) { if (!validations[i] && (submit_event || is_ajax)) { if (this.settings.focus_on_invalid) els[i].focus(); - form.trigger('invalid'); + form.trigger('invalid').trigger('invalid.fndtn.abide'); this.S(els[i]).closest('form').attr(this.invalid_attr, ''); return false; } } if (submit_event || is_ajax) { - form.trigger('valid'); + form.trigger('valid').trigger('valid.fndtn.abide'); } form.removeAttr(this.invalid_attr); -- 2.47.2