]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add example to docs explaining reflow 9379/head
authorKevin Ball <kmball11@gmail.com>
Wed, 16 Nov 2016 18:33:44 +0000 (10:33 -0800)
committerKevin Ball <kmball11@gmail.com>
Wed, 16 Nov 2016 18:33:44 +0000 (10:33 -0800)
docs/pages/slider.md

index 78ccc50f802e44bbab48785c01755b3cf408e397..9857447c421f82d91fc04cc5bd3fff3886883815 100644 (file)
@@ -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');
+```