]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix formvalid/forminvalid trigger 7674/head
authorBrian Tan <briantan888@users.noreply.github.com>
Wed, 23 Dec 2015 17:14:38 +0000 (12:14 -0500)
committerBrian Tan <briantan888@users.noreply.github.com>
Wed, 23 Dec 2015 17:14:38 +0000 (12:14 -0500)
chaining was incorrect.

js/foundation.abide.js

index 3214f517859f1fde11b58f47e417ba3eddc06034..d5794a3e2bf656fda5afd0e61a6b7d9032f571a6 100644 (file)
 
     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;
   };