From dded67fdb13d3cde6bc632335258ff59d9f551e5 Mon Sep 17 00:00:00 2001 From: Olena Pastushenko Date: Sat, 10 Mar 2018 10:35:57 +0100 Subject: [PATCH] docs: fix example for custom validator Foundation initialization was misplaced in the example, hence it was confusing. Discussed in #9773. --- docs/pages/abide.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.47.3