From: Kevin Ball Date: Wed, 16 Nov 2016 18:33:44 +0000 (-0800) Subject: Add example to docs explaining reflow X-Git-Tag: v6.3-rc1~2^2~3^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9379%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Add example to docs explaining reflow --- 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'); +```