From c6207648872c4704eeca41eb7d416add5fb00651 Mon Sep 17 00:00:00 2001 From: Brian Tan Date: Wed, 23 Dec 2015 12:14:38 -0500 Subject: [PATCH] Fix formvalid/forminvalid trigger chaining was incorrect. --- js/foundation.abide.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/foundation.abide.js b/js/foundation.abide.js index 3214f5178..d5794a3e2 100644 --- a/js/foundation.abide.js +++ b/js/foundation.abide.js @@ -311,14 +311,14 @@ var noError = acc.indexOf(false) === -1; - this.$element.find('[data-abide-error]').css('display', (noError ? 'none' : 'block')) + this.$element.find('[data-abide-error]').css('display', (noError ? 'none' : 'block')); /** * Fires when the form is finished validating. Event trigger is either `formvalid.zf.abide` or `forminvalid.zf.abide`. * Trigger includes the element of the form. * @event Abide#formvalid * @event Abide#forminvalid */ - .trigger((noError ? 'formvalid' : 'forminvalid') + '.zf.abide', [this.$element]); + this.$element.trigger((noError ? 'formvalid' : 'forminvalid') + '.zf.abide', [this.$element]); return noError; }; -- 2.47.2