From: Olena Pastushenko Date: Sat, 10 Mar 2018 09:35:57 +0000 (+0100) Subject: docs: fix example for custom validator X-Git-Tag: v6.6.0~27^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dded67fdb;p=thirdparty%2Ffoundation%2Ffoundation-sites.git docs: fix example for custom validator Foundation initialization was misplaced in the example, hence it was confusing. Discussed in #9773. --- diff --git a/docs/pages/abide.md b/docs/pages/abide.md index 2c4bf8e9c..92442c0d0 100644 --- a/docs/pages/abide.md +++ b/docs/pages/abide.md @@ -350,9 +350,6 @@ website: { Foundation.Abide.defaults.patterns['dashes_only'] = /^[0-9-]*$/; Foundation.Abide.defaults.validators['greater_than'] = -// Init Foundation -$(document).foundation(); - function($el,required,parent) { // parameter 1 is jQuery selector if (!required) return true; @@ -360,6 +357,10 @@ function($el,required,parent) { to = $el.val(); return (parseInt(to) > parseInt(from)); }; + +// Init Foundation +$(document).foundation(); + ``` ```html