From 327b548b8d459166a550b3d951de6bda2b5770af Mon Sep 17 00:00:00 2001 From: Kevin Ball Date: Wed, 16 Nov 2016 10:33:44 -0800 Subject: [PATCH] Add example to docs explaining reflow --- docs/pages/slider.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/pages/slider.md b/docs/pages/slider.md index 78ccc50f8..9857447c4 100644 --- a/docs/pages/slider.md +++ b/docs/pages/slider.md @@ -130,3 +130,12 @@ It's possible to use both the JavaScript slider and the native slider in the sam - To disable the slider, add `disabled` as an attribute, instead of a class. - No support for vertical orientation. - No support for two handles. + +## Reflow + +The slider takes into account the width of the handles when calculating how to display itself. This means that if the slider is initially hidden, or hidden while the value is adjusted, the resulting visual will be slightly different because the width of the handle is indeterminate. If this is problematic, you can use JavaScript to cause the slider to reflow at the time that you change it from being hidden. Example: + +```js +$('#my-slider').show(); +$('#my-slider').foundation('_reflow'); +``` -- 2.47.2